mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-08 18:52:50 -06:00
treatment of Int: not always PredefAbs but can be PredefCnc
This commit is contained in:
@@ -51,7 +51,9 @@ 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
|
lookupResDefKind gr m c
|
||||||
| isPredefCat c = return (Q cPredefAbs c,2) --- need this in gf3 12/6/2008
|
| isPredefCat c = liftM (flip (,) 1) $ lock c defLinType
|
||||||
|
---- return (Q cPredefCnc c,2)
|
||||||
|
---- was PredefAbs till 3/9/2008, with explanation: need this in gf3 12/6/2008
|
||||||
| otherwise = look True m c where
|
| otherwise = look True m c where
|
||||||
look isTop m c = do
|
look isTop m c = do
|
||||||
mi <- lookupModule gr m
|
mi <- lookupModule gr m
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ module GF.Grammar.Predef
|
|||||||
, cTok
|
, cTok
|
||||||
, cStr
|
, cStr
|
||||||
, cStrs
|
, cStrs
|
||||||
, cPredefAbs, cPredef
|
, cPredefAbs, cPredefCnc, cPredef
|
||||||
, cInt
|
, cInt
|
||||||
, cFloat
|
, cFloat
|
||||||
, cString
|
, cString
|
||||||
@@ -58,6 +58,9 @@ cStrs = identC (BS.pack "Strs")
|
|||||||
cPredefAbs :: Ident
|
cPredefAbs :: Ident
|
||||||
cPredefAbs = identC (BS.pack "PredefAbs")
|
cPredefAbs = identC (BS.pack "PredefAbs")
|
||||||
|
|
||||||
|
cPredefCnc :: Ident
|
||||||
|
cPredefCnc = identC (BS.pack "PredefCnc")
|
||||||
|
|
||||||
cPredef :: Ident
|
cPredef :: Ident
|
||||||
cPredef = identC (BS.pack "Predef")
|
cPredef = identC (BS.pack "Predef")
|
||||||
|
|
||||||
|
|||||||
@@ -378,6 +378,7 @@ sameMType m n = case (n,m) of
|
|||||||
(MTInterface, MTInstance _) -> True
|
(MTInterface, MTInstance _) -> True
|
||||||
(MTInterface, MTResource) -> True -- for reuse
|
(MTInterface, MTResource) -> True -- for reuse
|
||||||
(MTInterface, MTAbstract) -> True -- for reuse
|
(MTInterface, MTAbstract) -> True -- for reuse
|
||||||
|
(MTInterface, MTConcrete _) -> True -- for reuse
|
||||||
|
|
||||||
(MTResource, MTInstance _) -> True
|
(MTResource, MTInstance _) -> True
|
||||||
(MTResource, MTConcrete _) -> True -- for reuse
|
(MTResource, MTConcrete _) -> True -- for reuse
|
||||||
|
|||||||
Reference in New Issue
Block a user