File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -585,6 +585,10 @@ private def whnfDelayedAssigned? (f' : Expr) (e : Expr) : MetaM (Option Expr) :=
585585Assuming `zeta` is enabled, zeta reduce lets. Does not take `zetaUnused` into account.
586586We put unused logic into `consumeUnusedLet`, since `expandLet` works with expressions with loose bound variables,
587587and thus determining whether a let variable is used isn't an O(1) operation.
588+
589+ Note: since `expandLet` and `consumeUnusedLet` are separated like this, a consequence is that
590+ in the `+zeta -zetaHave +zetaUnused` configuration, then `whnfCore` has quadratic complexity
591+ when reducing a sequence of alternating `let`s and `have`s where the `let`s are used but the `have`s are unused.
588592-/
589593partial def expandLet (e : Expr) (vs : Array Expr) (zetaHave : Bool := true ) : Expr :=
590594 if let .letE _ _ v b nondep := e then
You can’t perform that action at this time.
0 commit comments