fix names growing in liftWhere and redundant error for ErrorHole
Some checks failed
Publish Playground / build (push) Has been cancelled
Publish Playground / deploy (push) Has been cancelled

This commit is contained in:
2026-03-21 20:45:28 -07:00
parent c6835b9dfe
commit a40956a4cc
3 changed files with 4 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ stats = {}
acc = ''
name = ''
for line in open(fn):
if line.startswith('const'):
if line.startswith('const') or line.startswith('let'):
if name: stats[name] = len(acc)
acc = line
name = line.split()[1]

View File

@@ -52,7 +52,7 @@ liftWhereTm name env (LetRec fc nm ty t u) = do
modifyRef Defs (updateMap qn (Fn $ wrapLam qs t'))
-- The rest
u' <- liftWhereTm qn env' u
u' <- liftWhereTm name env' u
pure $ LetRec fc nm (Erased fc) (Erased fc) u'
where
-- TODO might be nice if we could nest the names (Foo.go.go) for nested where

View File

@@ -54,6 +54,8 @@ logMetas (Unsolved fc k ctx ty User cons :: rest) = do
let msg = "\{env}\n -----------\n \{render 90 $ pprint names ty'}"
info fc "User Hole\n\{msg}"
logMetas rest
-- error is reported separately
logMetas (Unsolved fc k ctx ty ErrorHole cons :: rest) = logMetas rest
logMetas (Unsolved fc k ctx ty kind cons :: rest) = do
ty' <- forceMeta ty
tm <- quote ctx.lvl ty'