Import Debian changes 20180207-1
[hcoop/debian/mlton.git] / regression / ex.sml
1 exception Foo of unit ref
2
3 fun f (x, r): int = if x then raise (Foo r)
4 else (f (true, r); 1 + 2)
5
6 fun loop (r: unit ref): int =
7 let val r' = ref ()
8 in if r = r'
9 then 13
10 else f (false, r') handle Foo r => loop r
11 end
12
13 val _ = loop (ref ())