This repository was archived by the owner on Nov 12, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -607,16 +607,13 @@ buildDepMap ci used externs ctx startNames
607607 -- convert applications of lambdas to lets
608608 -- note that this transformation preserves de bruijn numbering
609609 lamToLet :: Term -> Term
610- lamToLet tm = lamToLet' args f
610+ lamToLet tm = lamToLet' 0 args f
611611 where
612612 (f, args) = unApply tm
613613
614- lamToLet' :: [Term ] -> Term -> Term
615- lamToLet' (v: vs) (Bind n (Lam rig ty) tm) = Bind n (Let rig ty v) $ lamToLet' vs tm
616- lamToLet' [] tm = tm
617- lamToLet' vs tm = error $
618- " Erasure.hs:lamToLet': unexpected input: "
619- ++ " vs = " ++ show vs ++ " , tm = " ++ show tm
614+ lamToLet' :: Int -> [Term ] -> Term -> Term
615+ lamToLet' wk (v: vs) (Bind n (Lam rig ty) tm) = Bind n (Let rig ty (weakenTm wk v)) $ lamToLet' (wk+ 1 ) vs tm
616+ lamToLet' wk vs tm = mkApp tm $ map (weakenTm wk) vs
620617
621618 -- split "\x_i -> T(x_i)" into [x_i] and T
622619 unfoldLams :: Term -> ([Name ], Term )
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ import System.Directory
4141import System.FilePath
4242
4343ibcVersion :: Word16
44- ibcVersion = 166
44+ ibcVersion = 167
4545
4646-- | When IBC is being loaded - we'll load different things (and omit
4747-- different structures/definitions) depending on which phase we're in.
You can’t perform that action at this time.
0 commit comments