Commit 5099dd8d by Julian Kranz

### ---

parent c488bb68
This diff is collapsed.
This diff is collapsed.
 # tests that both branches of an if-statement are flowing into the result val ite c t e = if c then t else e val res = \$bar (ite '1' {bar=1,sum=7} {sum=8,zoo=9})
 # tests that both branches of an if-statement are flowing into the result val ite c t e = if c then t else e val res = \$sum (ite '1' {bar=1,sum=7} {sum=8,zoo=9})
 # tests that both branches of an if-statement are flowing into the result val foo = if '1' then {bar=1,sum=7} else {sum=8,zoo=9} val bar = \$zoo foo
 # tests that both branches of an if-statement are flowing into the result val foo = if '1' then {bar=1,sum=7} else {sum=8,zoo=9} val bar = \$sum foo
 # applying a function to the wrong number of arguments val f x y z = { sum = x + y, diff = x - z} val res x = f x 7
 # applying a function to the wrong number of arguments val f x y z = { sum = x + y, diff = x - z} val res x = f x 7 x
 # tests checking of no of arguments of recursive calls val f x y z = if x then f '0' z else 7
 # tests checking of no of arguments of recursive calls val f x y z = if x then f '0' z y else 7
 # tests if unknown definitions are checked correctly val res = \$foobar (id {bar=7, foo="Hi", baz='1'}) val id x = x
 # tests if unknown definitions are checked correctly val res = \$foo (id {bar=7, foo="Hi", baz='1'}) val id x = x
 # test record field val r = { foo = "a string", bar = 7 } val s = \$baz r
 # test record field val r = { foo = "a string", bar = 7 } val s = \$foo r
 # test if fields flow properly in monadic results val act = do y <- return {num=7}; z <- return {add=8}; return (@{ add = \$add z} y) end val res = do r <- act; return (\$number r + \$add r) end \ No newline at end of file
 # test if fields flow properly in monadic results val act = do y <- return {num=7}; z <- return {add=8}; return (@{ add = \$add z} y) end val res = do r <- act; return (\$num r + \$add r) end \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!