about summary refs log tree commit diff
path: root/src/Syntax.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Syntax.hs')
-rw-r--r--src/Syntax.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Syntax.hs b/src/Syntax.hs
index 18949d2..065f91d 100644
--- a/src/Syntax.hs
+++ b/src/Syntax.hs
@@ -6,7 +6,7 @@ data Typ = TInt
          | TRecord  TypeDict
          | TVariant TypeDict
          | TPtr Typ
-           deriving(Eq,Show)
+           deriving(Eq,Show,Read)
 type TypeDict = [(Idnt,Typ)]
 
 data Expr = Var Idnt
@@ -20,7 +20,7 @@ data Expr = Var Idnt
           | Match Expr [(Idnt, Idnt, Expr)] -- Variant,Binder, Expression
           | Proj Idnt Expr 
           | Annot Expr Typ
-           deriving(Eq,Show)
+           deriving(Eq,Show,Read)
 data Com = Skip
          | Seq Com Com
          | If Expr Com Com
@@ -31,13 +31,13 @@ data Com = Skip
          | Save Idnt Expr
          | SMatch Expr [(Idnt, Idnt, Com)]
          | FunctionCall Idnt Idnt [Expr] -- variable function_name parameters
-           deriving(Eq,Show)
+           deriving(Eq,Show,Read)
          
 data FuncDecl = Func Idnt [(Idnt, Typ)] [(Idnt,Expr)] Com Expr -- function_name [parameters]  [local variables] body return_val
-           deriving(Eq,Show)
+           deriving(Eq,Show,Read)
 data FuncSign = FuncSign [Typ] Typ
                 deriving(Eq,Show)
 type FuncEnv = [(Idnt,FuncSign)]
-data Program = P [FuncDecl] [(Idnt, Int)] Com
-           deriving(Eq,Show)
+data Program = Program [FuncDecl] [(Idnt, Expr)] Com
+           deriving(Eq,Show,Read)