summaryrefslogtreecommitdiff
path: root/src/compiler/GF
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2010-06-17 15:08:12 +0000
committerkrasimir <krasimir@chalmers.se>2010-06-17 15:08:12 +0000
commitd8b049fdf840c9f8f383c7568882a5d2d11afecb (patch)
treeecd1f2597f9a7dfd45e02bc659d37b340b6b171a /src/compiler/GF
parent183c87817394aad6adf6eb7e1bf3e297e1982e6f (diff)
rename GF.Grammar.Predef.isPredefCat to isLiteralCat
Diffstat (limited to 'src/compiler/GF')
-rw-r--r--src/compiler/GF/Compile/Abstract/TC.hs2
-rw-r--r--src/compiler/GF/Compile/Rename.hs4
-rw-r--r--src/compiler/GF/Grammar/Lookup.hs6
-rw-r--r--src/compiler/GF/Grammar/Predef.hs6
-rw-r--r--src/compiler/GF/Grammar/Values.hs2
5 files changed, 10 insertions, 10 deletions
diff --git a/src/compiler/GF/Compile/Abstract/TC.hs b/src/compiler/GF/Compile/Abstract/TC.hs
index 4758bacdb..8236bcf44 100644
--- a/src/compiler/GF/Compile/Abstract/TC.hs
+++ b/src/compiler/GF/Compile/Abstract/TC.hs
@@ -161,7 +161,7 @@ checkInferExp th tenv@(k,_,_) e typ = do
inferExp :: Theory -> TCEnv -> Exp -> Err (AExp, Val, [(Val,Val)])
inferExp th tenv@(k,rho,gamma) e = case e of
Vr x -> mkAnnot (AVr x) $ noConstr $ lookupVar gamma x
- Q (m,c) | m == cPredefAbs && isPredefCat c
+ Q (m,c) | m == cPredefAbs && isLiteralCat c
-> return (ACn (m,c) vType, vType, [])
| otherwise -> mkAnnot (ACn (m,c)) $ noConstr $ lookupConst th (m,c)
QC c -> mkAnnot (ACn c) $ noConstr $ lookupConst th c ----
diff --git a/src/compiler/GF/Compile/Rename.hs b/src/compiler/GF/Compile/Rename.hs
index a0ccdae12..a5645c26e 100644
--- a/src/compiler/GF/Compile/Rename.hs
+++ b/src/compiler/GF/Compile/Rename.hs
@@ -87,8 +87,8 @@ renameIdentTerm env@(act,imps) t =
-- this facility is mainly for BWC with GF1: you need not import PredefAbs
predefAbs c s
- | isPredefCat c = return $ Q (cPredefAbs,c)
- | otherwise = checkError s
+ | isLiteralCat c = return $ Q (cPredefAbs,c)
+ | otherwise = checkError s
ident alt c = case lookupTree showIdent c act of
Ok f -> return $ f c
diff --git a/src/compiler/GF/Grammar/Lookup.hs b/src/compiler/GF/Grammar/Lookup.hs
index d1473bbcd..f942bdcaf 100644
--- a/src/compiler/GF/Grammar/Lookup.hs
+++ b/src/compiler/GF/Grammar/Lookup.hs
@@ -60,8 +60,8 @@ lookupIdentInfo mo i = lookupIdent i (jments mo)
lookupResDef :: SourceGrammar -> QIdent -> Err Term
lookupResDef gr (m,c)
- | isPredefCat c = lock c defLinType
- | otherwise = look m c
+ | isLiteralCat c = lock c defLinType
+ | otherwise = look m c
where
look m c = do
mo <- lookupModule gr m
@@ -161,7 +161,7 @@ lookupAbsDef gr m c = errIn (render (text "looking up absdef of" <+> ppIdent c))
_ -> return (Nothing,Nothing)
lookupLincat :: SourceGrammar -> Ident -> Ident -> Err Type
-lookupLincat gr m c | isPredefCat c = return defLinType --- ad hoc; not needed?
+lookupLincat gr m c | isLiteralCat c = return defLinType --- ad hoc; not needed?
lookupLincat gr m c = do
mo <- lookupModule gr m
info <- lookupIdentInfo mo c
diff --git a/src/compiler/GF/Grammar/Predef.hs b/src/compiler/GF/Grammar/Predef.hs
index 045df06ca..370497cc7 100644
--- a/src/compiler/GF/Grammar/Predef.hs
+++ b/src/compiler/GF/Grammar/Predef.hs
@@ -24,7 +24,7 @@ module GF.Grammar.Predef
, cErrorType
, cOverload
, cUndefinedType
- , isPredefCat
+ , isLiteralCat
, cPTrue, cPFalse
@@ -88,8 +88,8 @@ cOverload = identC (BS.pack "overload")
cUndefinedType :: Ident
cUndefinedType = identC (BS.pack "UndefinedType")
-isPredefCat :: Ident -> Bool
-isPredefCat c = elem c [cInt,cString,cFloat]
+isLiteralCat :: Ident -> Bool
+isLiteralCat c = elem c [cInt,cString,cFloat]
cPTrue :: Ident
cPTrue = identC (BS.pack "PTrue")
diff --git a/src/compiler/GF/Grammar/Values.hs b/src/compiler/GF/Grammar/Values.hs
index 1a68ddc89..c5646f5b4 100644
--- a/src/compiler/GF/Grammar/Values.hs
+++ b/src/compiler/GF/Grammar/Values.hs
@@ -19,7 +19,7 @@ module GF.Grammar.Values (-- * values used in TC type checking
Binds, Constraints, MetaSubst,
-- * for TC
valAbsInt, valAbsFloat, valAbsString, vType,
- isPredefCat,
+ isLiteralCat,
eType,
--Z tree2exp, loc2treeFocus
) where