3 from Data.Maybe import :: Maybe
4 from StdOverloaded import class toString
6 :: Pos = {line :: Int, col :: Int}
8 :: AST = AST [VarDecl] [FunDecl]
9 :: VarDecl = VarDecl Type String Expr
11 = TupleType (Type, Type)
20 | Op2Expr Expr Op2 Expr
27 | TupleExpr (Expr, Expr)
28 :: VarDef = VarDef String [FieldSelector]
29 :: FieldSelector = FieldHd | FieldTl | FieldFst | FieldSnd
30 :: Op1 = UnNegation | UnMinus
31 :: Op2 = BiPlus | BiMinus | BiTimes | BiDivide | BiMod | BiEquals | BiLesser |
32 BiGreater | BiLesserEq | BiGreaterEq | BiUnEqual | BiAnd | BiOr | BiCons
34 :: FunDecl = FunDecl String [String] (Maybe FunType) [VarDecl] [Stmt]
35 :: FunType = FunType [Type] (Maybe Type)
36 :: FunCall = FunCall String [Expr]
38 = IfStmt Expr [Stmt] [Stmt]
39 | WhileStmt Expr [Stmt]
42 | ReturnStmt (Maybe Expr)