strictness, ci
[minfp.git] / ast.dcl
diff --git a/ast.dcl b/ast.dcl
index 9e733b2..55f98dd 100644 (file)
--- a/ast.dcl
+++ b/ast.dcl
@@ -3,24 +3,30 @@ definition module ast
 from Data.Either import :: Either
 from StdOverloaded import class toString
 
+from int import :: Eval
+
 :: Function = Function [Char] [[Char]] Expression
+:: TypeDef = TypeDef [Char] [[Char]] [([Char], [Type])]
+
 :: Expression
        = Lit Value
        | Var [Char]
        | App Expression Expression
        | Lambda [Char] Expression
-       | Builtin [Char] [Expression]
-       | Let [Char] [[Char]] Expression Expression
+       | Let [([Char], Expression)] Expression
 
 :: Value
        = Int Int
        | Bool Bool
-       | Func Int [Expression] ([Expression] -> Expression)
+       | ** infix 9 Expression Expression
+       | Lambda` [Char] Expression
+       | Builtin (Expression -> Eval Expression)
 
 :: Type
        = TVar [Char]
        | TInt
        | TBool
-       | TFun Type Type
+       | TApp Type Type
+       | (-->) infixr 9 Type Type
 
-instance toString Expression, Value, Type
+instance toString Function, Expression, Value, Type, TypeDef