]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/MonadSyntax5.scl
Merge "(refs #7508) Edo and modified mdo under edo feature"
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / MonadSyntax5.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/MonadSyntax5.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/MonadSyntax5.scl
new file mode 100644 (file)
index 0000000..35327aa
--- /dev/null
@@ -0,0 +1,22 @@
+// Old mdo
+import "Prelude"
+
+main = mdo 
+  x <- [1,2]
+  return $ print "\(x :: Integer)"
+--
+1
+2
+[(), ()]
+--
+// New mdo
+module {
+    features = [edo]
+}
+import "Prelude"
+
+main = mdo 
+  x <- [1,2]
+  return $ print "\(x :: Integer)"
+--
+9:12-9:35: No side-effects allowed here.
\ No newline at end of file