summaryrefslogtreecommitdiff
path: root/src/GF/Grammar
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2007-12-16 22:24:36 +0000
committeraarne <aarne@cs.chalmers.se>2007-12-16 22:24:36 +0000
commit7551c70db6c76a796e93fa1cd4ebe7c850344b7e (patch)
tree9a473d9fc972ac26b7a9bed00673609f47c18193 /src/GF/Grammar
parent49b3ffb7a0ba176a6689d7792ad42cdd2f17adee (diff)
restored Int size and last ; added lib/prelude to be the last in any grammar path
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