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/Grammar/Grammar.hs | |
| parent | 50ddb387f4495beb8bd8da2b9726a087a489df68 (diff) | |
floats in GF and GFC (parsing user input still doesn't work)
Diffstat (limited to 'src/GF/Grammar/Grammar.hs')
| -rw-r--r-- | src/GF/Grammar/Grammar.hs | 6 |
1 files changed, 4 insertions, 2 deletions
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) |
