lean4-htt/tests/lean/baseIO.lean.expected.out
Cameron Zwarich e86ab1b1db
fix: make IO.RealWorld opaque (#9631)
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.
2025-09-08 18:12:19 +00:00

16 lines
623 B
Text

[Compiler.saveBase] size: 11
def test a.1 : EStateM.Result Empty lcRealWorld UInt32 :=
let _x.2 := 42;
let _x.3 := @ST.Prim.mkRef _ _ _x.2 a.1;
cases _x.3 : EStateM.Result Empty lcRealWorld UInt32
| EStateM.Result.ok a.4 a.5 =>
let _x.6 := 10;
let _x.7 := @ST.Prim.Ref.set _ _ a.4 _x.6 a.5;
cases _x.7 : EStateM.Result Empty lcRealWorld UInt32
| EStateM.Result.ok a.8 a.9 =>
let _x.10 := @ST.Prim.Ref.get _ _ a.4 a.9;
return _x.10
| EStateM.Result.error a.11 a.12 =>
| EStateM.Result.error a.13 a.14 =>