mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
treating Int as PredefAbs.Int in lookup
This commit is contained in:
@@ -176,7 +176,6 @@ compileSourceModule opts env@(k,gr,_) mo@(i,mi) = do
|
|||||||
if null warnings then return () else putp warnings $ return ()
|
if null warnings then return () else putp warnings $ return ()
|
||||||
intermOut opts DumpTypeCheck (prModule mo3)
|
intermOut opts DumpTypeCheck (prModule mo3)
|
||||||
|
|
||||||
|
|
||||||
(k',mo3r:_) <- putpp " refreshing " $ ioeErr $ refreshModule (k,mos) mo3
|
(k',mo3r:_) <- putpp " refreshing " $ ioeErr $ refreshModule (k,mos) mo3
|
||||||
intermOut opts DumpRefresh (prModule mo3r)
|
intermOut opts DumpRefresh (prModule mo3r)
|
||||||
|
|
||||||
|
|||||||
@@ -50,12 +50,14 @@ lookupResDef gr m c = liftM fst $ lookupResDefKind gr m c
|
|||||||
|
|
||||||
-- 0 = oper, 1 = lin, 2 = canonical. v > 0 means: no need to be recomputed
|
-- 0 = oper, 1 = lin, 2 = canonical. v > 0 means: no need to be recomputed
|
||||||
lookupResDefKind :: SourceGrammar -> Ident -> Ident -> Err (Term,Int)
|
lookupResDefKind :: SourceGrammar -> Ident -> Ident -> Err (Term,Int)
|
||||||
lookupResDefKind gr m c = look True m c where
|
lookupResDefKind gr m c
|
||||||
|
| isPredefCat c = return (Q cPredefAbs c,2) --- need this in gf3 12/6/2008
|
||||||
|
| otherwise = look True m c where
|
||||||
look isTop m c = do
|
look isTop m c = do
|
||||||
mi <- lookupModule gr m
|
mi <- lookupModule gr m
|
||||||
case mi of
|
case mi of
|
||||||
ModMod mo -> do
|
ModMod mo -> do
|
||||||
info <- lookupIdentInfo mo c
|
info <- lookupIdentInfoIn mo m c
|
||||||
case info of
|
case info of
|
||||||
ResOper _ (Yes t) -> return (qualifAnnot m t, 0)
|
ResOper _ (Yes t) -> return (qualifAnnot m t, 0)
|
||||||
ResOper _ Nope -> return (Q m c, 0) ---- if isTop then lookExt m c
|
ResOper _ Nope -> return (Q m c, 0) ---- if isTop then lookExt m c
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ module GF.Grammar.PrGrammar (Print(..),
|
|||||||
prConstrs, prConstraints,
|
prConstrs, prConstraints,
|
||||||
prMetaSubst, prEnv, prMSubst,
|
prMetaSubst, prEnv, prMSubst,
|
||||||
prExp, prOperSignature,
|
prExp, prOperSignature,
|
||||||
lookupIdent, lookupIdentInfo,
|
lookupIdent, lookupIdentInfo, lookupIdentInfoIn,
|
||||||
prTermTabular
|
prTermTabular
|
||||||
) where
|
) where
|
||||||
|
|
||||||
@@ -255,6 +255,10 @@ lookupIdent c t = case lookupTree prt c t of
|
|||||||
lookupIdentInfo :: Module Ident a -> Ident -> Err a
|
lookupIdentInfo :: Module Ident a -> Ident -> Err a
|
||||||
lookupIdentInfo mo i = lookupIdent i (jments mo)
|
lookupIdentInfo mo i = lookupIdent i (jments mo)
|
||||||
|
|
||||||
|
lookupIdentInfoIn :: Module Ident a -> Ident -> Ident -> Err a
|
||||||
|
lookupIdentInfoIn mo m i =
|
||||||
|
err (\s -> Bad (s +++ "in module" +++ prt m)) return $ lookupIdentInfo mo i
|
||||||
|
|
||||||
|
|
||||||
--- printing cc command output AR 26/5/2008
|
--- printing cc command output AR 26/5/2008
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user