X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=tests%2Forg.simantics.scl.compiler.tests%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftests%2Fscl%2FMonadSyntax5.scl;fp=tests%2Forg.simantics.scl.compiler.tests%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftests%2Fscl%2FMonadSyntax5.scl;h=35327aa02e91fc5c72abc21a6ba0c34950b5b966;hp=0000000000000000000000000000000000000000;hb=34656219dde2130ecbeedd274ddd83c6df5699e0;hpb=e0f95bc4e0fa1797b9b97aec3b3329364ca634cf 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 index 000000000..35327aa02 --- /dev/null +++ b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/MonadSyntax5.scl @@ -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