We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05654e8 commit e76a805Copy full SHA for e76a805
tests/lean/run/eta_lambda_lift.lean
@@ -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