From f43838280ce37c8ce67eda2d36f4021439f0a84c Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sun, 23 Apr 2023 16:15:21 +0200 Subject: Untested minimal viable parser --- AST.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'AST.hs') diff --git a/AST.hs b/AST.hs index b9dd3df..a6726ca 100644 --- a/AST.hs +++ b/AST.hs @@ -38,6 +38,8 @@ data RHS t data Expr t = ELit t Literal + | EVar t Name + | ECon t Name | EList t [Expr t] | ETup t [Expr t] | EApp t (Expr t) [Expr t] @@ -47,7 +49,7 @@ data Expr t | ELet t [FunDef t] (Expr t) deriving (Show) -data Literal = LInt Int | LFloat Double | LChar Char | LString String +data Literal = LInt Integer | LFloat Rational | LChar Char | LString String deriving (Show) data Operator = OAdd | OSub | OMul | ODiv | OMod | OEqu | OPow -- cgit v1.2.3-70-g09d2