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/Grammar/Grammar.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/GF/Grammar/Grammar.hs') diff --git a/src/GF/Grammar/Grammar.hs b/src/GF/Grammar/Grammar.hs index ff5209204..4a983abcc 100644 --- a/src/GF/Grammar/Grammar.hs +++ b/src/GF/Grammar/Grammar.hs @@ -114,7 +114,8 @@ data Term = | Con Ident -- ^ constructor | EData -- ^ to mark in definition that a fun is a constructor | Sort String -- ^ basic type - | EInt Int -- ^ integer literal + | EInt Integer -- ^ integer literal + | EFloat Double -- ^ floating point literal | K String -- ^ string literal or token: @\"foo\"@ | Empty -- ^ the empty string @[]@ @@ -167,7 +168,8 @@ data Patt = | PW -- ^ wild card pattern: @_@ | PR [(Label,Patt)] -- ^ record pattern: @{r = p ; ...}@ -- only concrete | PString String -- ^ string literal pattern: @\"foo\"@ -- only abstract - | PInt Int -- ^ integer literal pattern: @12@ -- only abstract + | PInt Integer -- ^ integer literal pattern: @12@ -- only abstract + | PFloat Double -- ^ float literal pattern: @1.2@ -- only abstract | PT Type Patt -- ^ type-annotated pattern deriving (Read, Show, Eq, Ord) -- cgit v1.2.3