test: do with optional ;

This commit is contained in:
Leonardo de Moura 2020-09-28 12:41:33 -07:00
parent 96a0fb41be
commit 765a8ac984

View file

@ -0,0 +1,17 @@
new_frontend
def f (x : Nat) : IO Nat := do
IO.println "hello world"
let aux (y : Nat) (z : Nat) : IO Nat := do
IO.println "aux started"
IO.println ("y: " ++ toString y ++ ", z: " ++ toString z)
return x+y
aux x
(x + 1) -- It is part of the application since it is indented
aux x (x -- parentheses use `withoutPosition`
-1)
aux x x;
aux x
x
#eval f 10