Skip to content

Commit d8c54fb

Browse files
authored
fix: consider any type application of an erased term to be erased (#8716)
This PR makes any type application of an erased term to be erased. This comes up a bit more than one would expect in the implementation of Lean itself.
1 parent aab65f5 commit d8c54fb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Lean/Compiler/LCNF/MonoTypes.lean

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,7 @@ partial def toMonoType (type : Expr) : CoreM Expr := do
8888
where
8989
visitApp (f : Expr) (args : Array Expr) : CoreM Expr := do
9090
match f with
91-
| .const ``lcErased _ =>
92-
if args.all (·.isErased) then
93-
return erasedExpr
94-
else
95-
return anyExpr
91+
| .const ``lcErased _ => return erasedExpr
9692
| .const ``lcAny _ => return anyExpr
9793
| .const ``Decidable _ => return mkConst ``Bool
9894
| .const declName us =>

0 commit comments

Comments
 (0)