strictness, ci
[minfp.git] / ast.dcl
diff --git a/ast.dcl b/ast.dcl
index 7dd17d7..55f98dd 100644 (file)
--- a/ast.dcl
+++ b/ast.dcl
@@ -6,6 +6,7 @@ from StdOverloaded import class toString
 from int import :: Eval
 
 :: Function = Function [Char] [[Char]] Expression
+:: TypeDef = TypeDef [Char] [[Char]] [([Char], [Type])]
 
 :: Expression
        = Lit Value
@@ -17,6 +18,15 @@ from int import :: Eval
 :: Value
        = Int Int
        | Bool Bool
-       | Func (Expression -> Eval Value)
+       | ** infix 9 Expression Expression
+       | Lambda` [Char] Expression
+       | Builtin (Expression -> Eval Expression)
 
-instance toString Function, Expression, Value
+:: Type
+       = TVar [Char]
+       | TInt
+       | TBool
+       | TApp Type Type
+       | (-->) infixr 9 Type Type
+
+instance toString Function, Expression, Value, Type, TypeDef