summaryrefslogtreecommitdiff
path: root/src/GF
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-09-03 09:33:37 +0000
committeraarne <aarne@cs.chalmers.se>2008-09-03 09:33:37 +0000
commitcf00c0c2a9aa1e333a95f3cd31b243f64bbe7812 (patch)
tree1a2ee64dd408296fe3946f466bf22717472c3418 /src/GF
parentd1ebdf8154855964b4dbeaca7791589b103fd621 (diff)
treatment of Int: not always PredefAbs but can be PredefCnc
Diffstat (limited to 'src/GF')
-rw-r--r--src/GF/Grammar/Lookup.hs4
-rw-r--r--src/GF/Grammar/Predef.hs5
-rw-r--r--src/GF/Infra/Modules.hs1
3 files changed, 8 insertions, 2 deletions
diff --git a/src/GF/Grammar/Lookup.hs b/src/GF/Grammar/Lookup.hs
index a4208b21b..b8c6a2a19 100644
--- a/src/GF/Grammar/Lookup.hs
+++ b/src/GF/Grammar/Lookup.hs
@@ -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
lookupResDefKind :: SourceGrammar -> Ident -> Ident -> Err (Term,Int)
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
look isTop m c = do
mi <- lookupModule gr m
diff --git a/src/GF/Grammar/Predef.hs b/src/GF/Grammar/Predef.hs
index 71f152f92..045df06ca 100644
--- a/src/GF/Grammar/Predef.hs
+++ b/src/GF/Grammar/Predef.hs
@@ -15,7 +15,7 @@ module GF.Grammar.Predef
, cTok
, cStr
, cStrs
- , cPredefAbs, cPredef
+ , cPredefAbs, cPredefCnc, cPredef
, cInt
, cFloat
, cString
@@ -58,6 +58,9 @@ cStrs = identC (BS.pack "Strs")
cPredefAbs :: Ident
cPredefAbs = identC (BS.pack "PredefAbs")
+cPredefCnc :: Ident
+cPredefCnc = identC (BS.pack "PredefCnc")
+
cPredef :: Ident
cPredef = identC (BS.pack "Predef")
diff --git a/src/GF/Infra/Modules.hs b/src/GF/Infra/Modules.hs
index 797f729c8..913afc89e 100644
--- a/src/GF/Infra/Modules.hs
+++ b/src/GF/Infra/Modules.hs
@@ -378,6 +378,7 @@ sameMType m n = case (n,m) of
(MTInterface, MTInstance _) -> True
(MTInterface, MTResource) -> True -- for reuse
(MTInterface, MTAbstract) -> True -- for reuse
+ (MTInterface, MTConcrete _) -> True -- for reuse
(MTResource, MTInstance _) -> True
(MTResource, MTConcrete _) -> True -- for reuse