Skip to content

Commit e76a805

Browse files
committed
add a test
1 parent 05654e8 commit e76a805

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import Lean.Util.FindExpr
2+
3+
/-!
4+
This test asserts that the compiler will eta contract trivial lambdas instead of lambda lifting
5+
them.
6+
-/
7+
8+
/--
9+
trace: [Compiler.lambdaLifting] size: 2
10+
def test e : Option Lean.Expr :=
11+
let _f.1 := Lean.Expr.hasMVar;
12+
let _x.2 := Lean.Expr.findImpl? _f.1 e;
13+
return _x.2
14+
-/
15+
#guard_msgs in
16+
set_option trace.Compiler.lambdaLifting true in
17+
def test (e : Lean.Expr) := e.find? (fun e => e.hasMVar)

0 commit comments

Comments
 (0)