lean4-htt/tests/lean/run/whenIO.lean
2017-03-23 14:29:07 -07:00

8 lines
203 B
Text

import system.io
open io
variable [io.interface]
def iowhen (b : bool) (a : io unit) : io unit :=
if b = tt then a else return ()
#eval iowhen tt (put_str "hello\n")
#eval iowhen ff (put_str "error\n")