]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/While2.scl
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / While2.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/While2.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/While2.scl
new file mode 100644 (file)
index 0000000..6567c22
--- /dev/null
@@ -0,0 +1,12 @@
+import "Prelude" hiding (while)\r
+\r
+while :: Maybe Boolean -> Maybe a -> Maybe ()\r
+while condM bodyM = mdo\r
+    cond <- condM\r
+    if cond \r
+    then bodyM >> while condM bodyM\r
+    else return ()\r
+\r
+main = "FOO"\r
+--\r
+FOO
\ No newline at end of file