This PR makes `IO.RealWorld` opaque. It also adds a new compiler -only `lcRealWorld` constant to represent this type within the compiler. By default, an opaque type definition is treated like `lcAny`, whereas we want a more efficient representation. At the moment, this isn't a big difference, but in the future we would like to completely erase `IO.RealWorld` at runtime.
11 lines
352 B
Text
11 lines
352 B
Text
[Compiler.saveMono] size: 7
|
|
def foo b a.1 : EStateM.Result IO.Error lcRealWorld PUnit :=
|
|
cases b : EStateM.Result IO.Error lcRealWorld PUnit
|
|
| Bool.false =>
|
|
let _x.2 := 1;
|
|
let _x.3 := print _x.2 a.1;
|
|
return _x.3
|
|
| Bool.true =>
|
|
let _x.4 := 0;
|
|
let _x.5 := print _x.4 a.1;
|
|
return _x.5
|