Fix porting errors.

This commit is contained in:
Matus Tejiscak 2020-05-22 20:29:56 +02:00
parent 74dd653fc5
commit 394047906d
2 changed files with 4 additions and 5 deletions

View File

@ -189,7 +189,7 @@ mutual
symbol "}" symbol "}"
pure (Nothing, tm) pure (Nothing, tm)
with_ : FileName -> IndentInfo -> Rule PTerm with_ : FileName -> IndentInfo -> SourceRule PTerm
with_ fname indents with_ fname indents
= do start <- location = do start <- location
keyword "with" keyword "with"
@ -199,12 +199,12 @@ mutual
rhs <- expr pdef fname indents rhs <- expr pdef fname indents
pure (PWithUnambigNames (MkFC fname start end) ns rhs) pure (PWithUnambigNames (MkFC fname start end) ns rhs)
where where
singleName : Rule (List Name) singleName : SourceRule (List Name)
singleName = do singleName = do
n <- name n <- name
pure [n] pure [n]
nameList : Rule (List Name) nameList : SourceRule (List Name)
nameList = do nameList = do
symbol "[" symbol "["
commit commit

View File

@ -218,8 +218,7 @@ checkTerm rig elabinfo nest env (Implicit fc b) Nothing
put EST (addBindIfUnsolved nm rig Explicit env metaval ty est) put EST (addBindIfUnsolved nm rig Explicit env metaval ty est)
pure (metaval, gnf env ty) pure (metaval, gnf env ty)
checkTerm rig elabinfo nest env (IWithUnambigNames fc ns rhs) exp checkTerm rig elabinfo nest env (IWithUnambigNames fc ns rhs) exp
= with Core do = do -- enter the scope -> add unambiguous names
-- enter the scope -> add unambiguous names
est <- get EST est <- get EST
rns <- resolveNames fc ns rns <- resolveNames fc ns
put EST $ record { unambiguousNames = mergeLeft rns (unambiguousNames est) } est put EST $ record { unambiguousNames = mergeLeft rns (unambiguousNames est) } est