3 from Data.Maybe import :: Maybe
4 from StdOverloaded import class toString, class ==, class zero, class <
6 :: Pos = {line :: Int, col :: Int}
8 :: VarDecl = VarDecl Pos (Maybe Type) String Expr
11 = TupleType (Type, Type)
19 | (->>) infixl 7 Type Type
22 | Op2Expr Pos Expr Op2 Expr
23 | Op1Expr Pos Op1 Expr
27 | FunExpr Pos String [Expr] [FieldSelector]
29 | TupleExpr Pos (Expr, Expr)
30 :: VarDef = VarDef String [FieldSelector]
31 :: FieldSelector = FieldHd | FieldTl | FieldFst | FieldSnd
32 :: Op1 = UnNegation | UnMinus
33 :: Op2 = BiPlus | BiMinus | BiTimes | BiDivide | BiMod | BiEquals | BiLesser |
34 BiGreater | BiLesserEq | BiGreaterEq | BiUnEqual | BiAnd | BiOr | BiCons
35 :: FunDecl = FunDecl Pos String [String] (Maybe Type) [VarDecl] [Stmt]
37 = IfStmt Expr [Stmt] [Stmt]
38 | WhileStmt Expr [Stmt]
40 | FunStmt String [Expr] [FieldSelector]
41 | ReturnStmt (Maybe Expr)
44 instance toString Type
46 instance toString FieldSelector
48 instance toString Expr
49 instance toString VarDecl