From 7fcb2fa33322608e165d30cdff939b24f2a1ae36 Mon Sep 17 00:00:00 2001 From: Fedor Isakov Date: Wed, 23 Nov 2016 21:09:23 +0100 Subject: [PATCH] Types aspect. Simple typesystem based on Hindley-Milner. --- .../sample.fooblin/models/behavior.mps | 399 ++++- .../sample.fooblin/models/editor.mps | 111 +- .../sample.fooblin/models/structure.mps | 44 +- .../languages/sample.fooblin/models/types.mps | 1379 +++++++++++++++++ .../sample.fooblin/sample.fooblin.mpl | 8 + .../models/sample/demo/fooblah.mps | 49 +- 6 files changed, 1981 insertions(+), 9 deletions(-) create mode 100644 samples/lambdacalc/languages/sample.fooblin/models/types.mps diff --git a/samples/lambdacalc/languages/sample.fooblin/models/behavior.mps b/samples/lambdacalc/languages/sample.fooblin/models/behavior.mps index b83f5231..307e6e40 100644 --- a/samples/lambdacalc/languages/sample.fooblin/models/behavior.mps +++ b/samples/lambdacalc/languages/sample.fooblin/models/behavior.mps @@ -5,7 +5,402 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/lambdacalc/languages/sample.fooblin/models/editor.mps b/samples/lambdacalc/languages/sample.fooblin/models/editor.mps index b087b9e4..7e96e866 100644 --- a/samples/lambdacalc/languages/sample.fooblin/models/editor.mps +++ b/samples/lambdacalc/languages/sample.fooblin/models/editor.mps @@ -88,6 +88,7 @@ + @@ -129,6 +130,7 @@ + @@ -355,7 +357,7 @@ - + @@ -389,6 +391,9 @@ + + + @@ -848,7 +853,7 @@ - + @@ -860,7 +865,7 @@ - + @@ -957,5 +962,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/lambdacalc/languages/sample.fooblin/models/structure.mps b/samples/lambdacalc/languages/sample.fooblin/models/structure.mps index c6fd979a..16ea986f 100644 --- a/samples/lambdacalc/languages/sample.fooblin/models/structure.mps +++ b/samples/lambdacalc/languages/sample.fooblin/models/structure.mps @@ -102,7 +102,7 @@ - + @@ -114,7 +114,7 @@ - + @@ -260,5 +260,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/lambdacalc/languages/sample.fooblin/models/types.mps b/samples/lambdacalc/languages/sample.fooblin/models/types.mps new file mode 100644 index 00000000..0520e901 --- /dev/null +++ b/samples/lambdacalc/languages/sample.fooblin/models/types.mps @@ -0,0 +1,1379 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/lambdacalc/languages/sample.fooblin/sample.fooblin.mpl b/samples/lambdacalc/languages/sample.fooblin/sample.fooblin.mpl index 57031cf8..47f25326 100644 --- a/samples/lambdacalc/languages/sample.fooblin/sample.fooblin.mpl +++ b/samples/lambdacalc/languages/sample.fooblin/sample.fooblin.mpl @@ -54,6 +54,7 @@ 8865b7a8-5271-43d3-884c-6fd1d9cfdd34(MPS.OpenAPI) af858d84-85f2-42f4-a854-0b3c6b5cd482(sample.fooblin) + 26e8f4ce-2a35-4f44-8065-e5ba154b18e9(jetbrains.mps.lang.typesystem2.runtime) 2677cb18-f558-4e33-bc38-a5139cee06dc(jetbrains.mps.devkit.language-design) @@ -76,12 +77,14 @@ + + @@ -92,6 +95,8 @@ + + @@ -101,6 +106,9 @@ + + + diff --git a/samples/lambdacalc/solutions/sample.demo/models/sample/demo/fooblah.mps b/samples/lambdacalc/solutions/sample.demo/models/sample/demo/fooblah.mps index 83310843..a57c0ef8 100644 --- a/samples/lambdacalc/solutions/sample.demo/models/sample/demo/fooblah.mps +++ b/samples/lambdacalc/solutions/sample.demo/models/sample/demo/fooblah.mps @@ -20,7 +20,7 @@ - + @@ -30,6 +30,9 @@ + + + @@ -40,12 +43,54 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +