diff options
| author | aarne <aarne@cs.chalmers.se> | 2005-12-02 13:13:14 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2005-12-02 13:13:14 +0000 |
| commit | dea5158cbf1c11d45f2ed91d9975fbc77245e652 (patch) | |
| tree | 751ef7bcaccf58c43354d5b1767d3b3d3d1ac34d /src/GF/Source/SourceToGrammar.hs | |
| parent | 50ddb387f4495beb8bd8da2b9726a087a489df68 (diff) | |
floats in GF and GFC (parsing user input still doesn't work)
Diffstat (limited to 'src/GF/Source/SourceToGrammar.hs')
| -rw-r--r-- | src/GF/Source/SourceToGrammar.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/GF/Source/SourceToGrammar.hs b/src/GF/Source/SourceToGrammar.hs index 421435bbc..2e63e68d4 100644 --- a/src/GF/Source/SourceToGrammar.hs +++ b/src/GF/Source/SourceToGrammar.hs @@ -396,7 +396,8 @@ transExp x = case x of EQCons m c -> liftM2 G.Q (transIdent m) (transIdent c) EString str -> return $ G.K str ESort sort -> liftM G.Sort $ transSort sort - EInt n -> return $ G.EInt $ fromInteger n + EInt n -> return $ G.EInt n + EFloat n -> return $ G.EFloat n EMeta -> return $ M.meta $ M.int2meta 0 EEmpty -> return G.Empty -- [ C x_1 ... x_n ] becomes (ListC x_1 ... x_n) @@ -522,7 +523,8 @@ transPatt x = case x of PV id -> liftM G.PV $ transIdent id PC id patts -> liftM2 G.PC (transIdent id) (mapM transPatt patts) PCon id -> liftM2 G.PC (transIdent id) (return []) - PInt n -> return $ G.PInt (fromInteger n) + PInt n -> return $ G.PInt n + PFloat n -> return $ G.PFloat n PStr str -> return $ G.PString str PR pattasss -> do let (lss,ps) = unzip [(ls,p) | PA ls p <- pattasss] |
