aboutsummaryrefslogtreecommitdiff
path: root/AST.hs
diff options
context:
space:
mode:
Diffstat (limited to 'AST.hs')
-rw-r--r--AST.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/AST.hs b/AST.hs
index 2e1bb13..47652b6 100644
--- a/AST.hs
+++ b/AST.hs
@@ -6,7 +6,10 @@ import Data.List.NonEmpty (NonEmpty)
newtype Name = Name String
deriving (Show, Eq)
-data Program t = Program [FunDef t]
+data Program t = Program [DataDef] [FunDef t]
+ deriving (Show)
+
+data DataDef = DataDef Name [Name] [(Name, [Type])]
deriving (Show)
data FunDef t = FunDef Name (Maybe Type) (NonEmpty (FunEq t))