summaryrefslogtreecommitdiff
path: root/src/GF/Compile/GrammarToCanon.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2005-12-02 13:13:14 +0000
committeraarne <aarne@cs.chalmers.se>2005-12-02 13:13:14 +0000
commitdea5158cbf1c11d45f2ed91d9975fbc77245e652 (patch)
tree751ef7bcaccf58c43354d5b1767d3b3d3d1ac34d /src/GF/Compile/GrammarToCanon.hs
parent50ddb387f4495beb8bd8da2b9726a087a489df68 (diff)
floats in GF and GFC (parsing user input still doesn't work)
Diffstat (limited to 'src/GF/Compile/GrammarToCanon.hs')
-rw-r--r--src/GF/Compile/GrammarToCanon.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/GF/Compile/GrammarToCanon.hs b/src/GF/Compile/GrammarToCanon.hs
index d5b52d062..de6427e82 100644
--- a/src/GF/Compile/GrammarToCanon.hs
+++ b/src/GF/Compile/GrammarToCanon.hs
@@ -231,7 +231,8 @@ redCTerm t = case t of
return $ G.V ty' ts'
S u v -> liftM2 G.S (redCTerm u) (redCTerm v)
K s -> return $ G.K (G.KS s)
- EInt i -> return $ G.EInt $ toInteger i
+ EInt i -> return $ G.EInt i
+ EFloat i -> return $ G.EFloat i
C u v -> liftM2 G.C (redCTerm u) (redCTerm v)
FV ts -> liftM G.FV $ mapM redCTerm ts
--- Ready ss -> return $ G.Ready [redStr ss] --- obsolete
@@ -259,7 +260,8 @@ redPatt p = case p of
ts <- mapM redPatt tts
return $ G.PR $ map (uncurry G.PAss) $ zip ls' ts
PT _ q -> redPatt q
- PInt i -> return $ G.PI (toInteger i)
+ PInt i -> return $ G.PI i
+ PFloat i -> return $ G.PF i
PV x -> liftM G.PV $ redIdent x --- for parametrize optimization
_ -> prtBad "cannot reduce pattern" p