egison-5.0.0: sample/ioRef.egi
def refTest {a} (x: a) (y: a) : IO () :=
do let w := newIORef ()
writeIORef w x
let w1 := readIORef w
print (show w1)
writeIORef w y
let w2 := readIORef w
print (show w2)
flush ()
def main (args: [String]) : IO () := refTest 1 2