3 from Data.Maybe import :: Maybe
4 from StdOverloaded import class toString, class ==
6 :: Pos = {line :: Int, col :: Int}
8 :: VarDecl = VarDecl Pos (Maybe Type) String Expr
10 = TupleType (Type, Type)
17 | (->>) infixl 7 Type Type
20 | Op2Expr Pos Expr Op2 Expr
21 | Op1Expr Pos Op1 Expr
25 | FunExpr Pos String [Expr] [FieldSelector]
27 | TupleExpr Pos (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
33 :: FunDecl = FunDecl Pos String [String] (Maybe Type) [VarDecl] [Stmt]
35 = IfStmt Expr [Stmt] [Stmt]
36 | WhileStmt Expr [Stmt]
38 | FunStmt String [Expr]
39 | ReturnStmt (Maybe Expr)
42 instance toString Type