From dea5158cbf1c11d45f2ed91d9975fbc77245e652 Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 2 Dec 2005 13:13:14 +0000 Subject: floats in GF and GFC (parsing user input still doesn't work) --- src/GF/Compile/CheckGrammar.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/GF/Compile/CheckGrammar.hs') diff --git a/src/GF/Compile/CheckGrammar.hs b/src/GF/Compile/CheckGrammar.hs index c46c51af7..14d4f9b93 100644 --- a/src/GF/Compile/CheckGrammar.hs +++ b/src/GF/Compile/CheckGrammar.hs @@ -279,6 +279,7 @@ computeLType gr t = do App (Q (IC "Predef") (IC "Ints")) _ -> return ty ---- shouldn't be needed Q (IC "Predef") (IC "Int") -> return ty ---- shouldn't be needed + Q (IC "Predef") (IC "Float") -> return ty ---- shouldn't be needed Q m c | elem c [cPredef,cPredefAbs] -> return ty @@ -416,6 +417,8 @@ inferLType gr trm = case trm of EInt i -> return (trm, typeInt) + EFloat i -> return (trm, typeFloat) + Empty -> return (trm, typeTok) C s1 s2 -> @@ -508,6 +511,7 @@ inferLType gr trm = case trm of PT _ p -> isConstPatt p PString _ -> True PInt _ -> True + PFloat _ -> True _ -> False inferPatt p = case p of -- cgit v1.2.3