]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/While.scl
Automatic execution of SCL tests in Maven
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / While.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/While.scl b/tests/org.simantics.scl.compiler.tests/src/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