summaryrefslogtreecommitdiff
path: root/src/GF/Grammar
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Grammar')
-rw-r--r--src/GF/Grammar/Lookup.hs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/GF/Grammar/Lookup.hs b/src/GF/Grammar/Lookup.hs
index 2acfa5f26..481512751 100644
--- a/src/GF/Grammar/Lookup.hs
+++ b/src/GF/Grammar/Lookup.hs
@@ -28,7 +28,8 @@ module GF.Grammar.Lookup (
allParamValues,
lookupAbsDef,
lookupLincat,
- opersForType
+ opersForType,
+ linTypeInt
) where
import GF.Data.Operations
@@ -229,16 +230,15 @@ lookupAbsDef gr m c = errIn ("looking up absdef of" +++ prt c) $ do
_ -> return Nothing
_ -> Bad $ prt m +++ "is not an abstract module"
-
-lookupLincat :: SourceGrammar -> Ident -> Ident -> Err Type
-{- ----
-lookupLincat gr m c | elem c [zIdent "Int"] =
+linTypeInt :: Type
+linTypeInt =
let ints k = App (Q (IC "Predef") (IC "Ints")) (EInt k) in
- return $
RecType [
- (LIdent "last",ints 9),(LIdent "s", typeStr),(LIdent "size",ints 1)]
--}
-lookupLincat gr m c | elem c [zIdent "String", zIdent "Float", zIdent "Int"] =
+ (LIdent "last",ints 9),(LIdent "s", typeStr), (LIdent "size",ints 1)]
+
+lookupLincat :: SourceGrammar -> Ident -> Ident -> Err Type
+lookupLincat gr m c | elem c [zIdent "Int"] = return linTypeInt
+lookupLincat gr m c | elem c [zIdent "String", zIdent "Float"] =
return defLinType --- ad hoc; not needed?
lookupLincat gr m c = do