diff options
| author | aarne <aarne@cs.chalmers.se> | 2007-10-21 10:01:14 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2007-10-21 10:01:14 +0000 |
| commit | a9472f91e571d0215c7db408c98b7514b3644ca9 (patch) | |
| tree | 4f9339aa950a02847ebbb851ba9ecfb4e08ae9b8 /src | |
| parent | bc2cac719b7fc4a4a4242b903c31d8e8bfcb258f (diff) | |
the lincat of Int simplified to SS again (Linear,Lookup,CheckGrammar by commenting out)
Diffstat (limited to 'src')
| -rw-r--r-- | src/GF/Compile/CheckGrammar.hs | 8 | ||||
| -rw-r--r-- | src/GF/Grammar/Lookup.hs | 6 | ||||
| -rw-r--r-- | src/GF/UseGrammar/Linear.hs | 8 |
3 files changed, 13 insertions, 9 deletions
diff --git a/src/GF/Compile/CheckGrammar.hs b/src/GF/Compile/CheckGrammar.hs index 94b2955cb..8d85f847a 100644 --- a/src/GF/Compile/CheckGrammar.hs +++ b/src/GF/Compile/CheckGrammar.hs @@ -311,10 +311,10 @@ computeLType gr t = do Q m c | elem c [cPredef,cPredefAbs] -> return ty Q m c | elem c [zIdent "Int"] -> - let ints k = App (Q (IC "Predef") (IC "Ints")) (EInt k) in - return $ - RecType [ - (LIdent "s", typeStr), (LIdent "last",ints 9),(LIdent "size",ints 1)] + return $ defLinType +---- let ints k = App (Q (IC "Predef") (IC "Ints")) (EInt k) in +---- RecType [ +---- (LIdent "last",ints 9),(LIdent "s", typeStr), (LIdent "size",ints 1)] Q m c | elem c [zIdent "Float",zIdent "String"] -> return defLinType ---- Q m ident -> checkIn ("module" +++ prt m) $ do diff --git a/src/GF/Grammar/Lookup.hs b/src/GF/Grammar/Lookup.hs index 01f6c20a1..a57793cd3 100644 --- a/src/GF/Grammar/Lookup.hs +++ b/src/GF/Grammar/Lookup.hs @@ -230,12 +230,14 @@ lookupAbsDef gr m c = errIn ("looking up absdef of" +++ prt c) $ do lookupLincat :: SourceGrammar -> Ident -> Ident -> Err Type +{- ---- lookupLincat gr m c | elem c [zIdent "Int"] = let ints k = App (Q (IC "Predef") (IC "Ints")) (EInt k) in return $ RecType [ - (LIdent "s", typeStr), (LIdent "last",ints 9),(LIdent "size",ints 1)] -lookupLincat gr m c | elem c [zIdent "String", zIdent "Float"] = + (LIdent "last",ints 9),(LIdent "s", typeStr),(LIdent "size",ints 1)] +-} +lookupLincat gr m c | elem c [zIdent "String", zIdent "Float", zIdent "Int"] = return defLinType --- ad hoc; not needed? lookupLincat gr m c = do diff --git a/src/GF/UseGrammar/Linear.hs b/src/GF/UseGrammar/Linear.hs index ac6c3b703..8b71fbc29 100644 --- a/src/GF/UseGrammar/Linear.hs +++ b/src/GF/UseGrammar/Linear.hs @@ -80,9 +80,11 @@ linearizeToRecord gr mk m = lin [] where recS t = R [Ass (L (identC "s")) t] ---- - recInt i = R [Ass (L (identC "s")) (tK $ show i), - Ass (L (identC "last")) (EInt (rem i 10)), - Ass (L (identC "size")) (EInt (if i > 9 then 1 else 0))] + recInt i = R [ + ----Ass (L (identC "last")) (EInt (rem i 10)), + Ass (L (identC "s")) (tK $ show i) ----, + ----Ass (L (identC "size")) (EInt (if i > 9 then 1 else 0)) + ] lookCat = return . errVal defLindef . look ---- should always be given in the module |
