]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/While2.scl
Merge commit '53059ca'
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / While2.scl
1 import "Prelude" hiding (while)\r
2 \r
3 while :: Maybe Boolean -> Maybe a -> Maybe ()\r
4 while condM bodyM = mdo\r
5     cond <- condM\r
6     if cond \r
7     then bodyM >> while condM bodyM\r
8     else return ()\r
9 \r
10 main = "FOO"\r
11 --\r
12 FOO