]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/While.scl
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / While.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/While.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/While.scl
new file mode 100644 (file)
index 0000000..3e45043
--- /dev/null
@@ -0,0 +1,10 @@
+\r
+while :: (<e> Boolean) -> (<e> a) -> <e> ()\r
+while cond body = loop ()\r
+  where loop _ = if cond\r
+                 then do body ; loop ()\r
+                 else ()\r
+\r
+main = "FOO"\r
+--\r
+FOO
\ No newline at end of file