lean4-htt/tests/lean/unhygienicCode.lean.expected.out
Henrik Böving 26f6bc67ee
feat: lambda pure conversion in LCNF (#12272)
This PR shifts the conversion from LCNF mono to lambda pure into the
LCNF impure phase. This is preparatory work for the upcoming refactor of
IR into LCNF impure.

The LCNF impure phase differs from the other LCNF phases in two crucial
ways:
1. I decided to have `Decl.type` be the result type as opposed to an
arrows from the parameter types to the result type. This is done because
impure does not have a notion of arrows anymore so keeping them around
for this one particular purpose would be slightly odd.
2. In order to avoid cluttering up the olean size LCNF impure saves only
the signature persistently to the disk. This is possible because we no
longer have inlining/specialization at this point of compilation so all
we need is typing information (and potentially other environment
extensions) to guide our analyses.
2026-02-03 10:24:59 +00:00

86 lines
2.7 KiB
Text

[Compiler.extractClosed] size: 3
def foo._closed_0 : SourceInfo :=
let _x.1 := false;
let _x.2 := Syntax.missing;
let _x.3 := @SourceInfo.fromRef _x.2 _x.1;
return _x.3
[Compiler.extractClosed] size: 1
def foo._closed_1 : String :=
let _x.1 := "UnhygienicMain";
return _x.1
[Compiler.extractClosed] size: 2
def foo._closed_2 : Name :=
let _x.1 := foo._closed_1;
let _x.2 := Name.mkStr1 _x.1;
return _x.2
[Compiler.extractClosed] size: 1
def foo._closed_3 : String :=
let _x.1 := "term_+_";
return _x.1
[Compiler.extractClosed] size: 2
def foo._closed_4 : Name :=
let _x.1 := foo._closed_3;
let _x.2 := Name.mkStr1 _x.1;
return _x.2
[Compiler.extractClosed] size: 1
def foo._closed_5 : String :=
let _x.1 := "a";
return _x.1
[Compiler.extractClosed] size: 2
def foo._closed_6 : Substring.Raw :=
let _x.1 := foo._closed_5;
let _x.2 := String.toRawSubstring' _x.1;
return _x.2
[Compiler.extractClosed] size: 2
def foo._closed_7 : Name :=
let _x.1 := foo._closed_5;
let _x.2 := Name.mkStr1 _x.1;
return _x.2
[Compiler.extractClosed] size: 4
def foo._closed_8 : Name :=
let _x.1 := 1;
let _x.2 := foo._closed_7;
let _x.3 := foo._closed_2;
let _x.4 := addMacroScope _x.3 _x.2 _x.1;
return _x.4
[Compiler.extractClosed] size: 5
def foo._closed_9 : Syntax :=
let _x.1 := [] ◾;
let _x.2 := foo._closed_8;
let _x.3 := foo._closed_6;
let _x.4 := foo._closed_0;
let _x.5 := Syntax.ident _x.4 _x.3 _x.2 _x.1;
return _x.5
[Compiler.extractClosed] size: 1
def foo._closed_10 : String :=
let _x.1 := "+";
return _x.1
[Compiler.extractClosed] size: 3
def foo._closed_11 : Syntax :=
let _x.1 := foo._closed_10;
let _x.2 := foo._closed_0;
let _x.3 := Syntax.atom _x.2 _x.1;
return _x.3
[Compiler.extractClosed] size: 20
def foo n : Syntax :=
let _x.1 := Syntax.missing;
let _x.2 := 1;
let _x.3 := false;
let _x.4 := foo._closed_0;
let _x.5 := foo._closed_1;
let _x.6 := foo._closed_2;
let _x.7 := foo._closed_3;
let _x.8 := foo._closed_4;
let _x.9 := foo._closed_5;
let _x.10 := foo._closed_6;
let _x.11 := foo._closed_7;
let _x.12 := foo._closed_8;
let _x.13 := [] ◾;
let _x.14 := foo._closed_9;
let _x.15 := foo._closed_10;
let _x.16 := foo._closed_11;
let _x.17 := Nat.reprFast n;
let _x.18 := SourceInfo.none;
let _x.19 := @Syntax.mkNumLit _x.17 _x.18;
let _x.20 := Syntax.node3 _x.4 _x.8 _x.14 _x.16 _x.19;
return _x.20