mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
cleanup in PGF.Typecheck -> newGuardedMeta doesn't need the current scope
This commit is contained in:
@@ -99,8 +99,8 @@ lookupFunType fun = TcM (\abstr metaid ms -> case Map.lookup fun (funs abstr) of
|
|||||||
newMeta :: Scope -> TcM MetaId
|
newMeta :: Scope -> TcM MetaId
|
||||||
newMeta scope = TcM (\abstr metaid ms -> Ok (metaid+1) (IntMap.insert metaid (MUnbound scope []) ms) metaid)
|
newMeta scope = TcM (\abstr metaid ms -> Ok (metaid+1) (IntMap.insert metaid (MUnbound scope []) ms) metaid)
|
||||||
|
|
||||||
newGuardedMeta :: Scope -> Expr -> TcM MetaId
|
newGuardedMeta :: Expr -> TcM MetaId
|
||||||
newGuardedMeta scope e = TcM (\abstr metaid ms -> Ok (metaid+1) (IntMap.insert metaid (MGuarded e [] 0) ms) metaid)
|
newGuardedMeta e = TcM (\abstr metaid ms -> Ok (metaid+1) (IntMap.insert metaid (MGuarded e [] 0) ms) metaid)
|
||||||
|
|
||||||
getMeta :: MetaId -> TcM MetaValue
|
getMeta :: MetaId -> TcM MetaValue
|
||||||
getMeta i = TcM (\abstr metaid ms -> Ok metaid ms $! case IntMap.lookup i ms of
|
getMeta i = TcM (\abstr metaid ms -> Ok metaid ms $! case IntMap.lookup i ms of
|
||||||
@@ -283,7 +283,7 @@ tcExpr scope (EMeta _) tty = do
|
|||||||
return (EMeta i)
|
return (EMeta i)
|
||||||
tcExpr scope e0 tty = do
|
tcExpr scope e0 tty = do
|
||||||
(e0,tty0) <- infExpr scope e0
|
(e0,tty0) <- infExpr scope e0
|
||||||
i <- newGuardedMeta scope e0
|
i <- newGuardedMeta e0
|
||||||
eqType scope (scopeSize scope) i tty tty0
|
eqType scope (scopeSize scope) i tty tty0
|
||||||
return (EMeta i)
|
return (EMeta i)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user