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)
18 | (->>) infixl 7 Type Type
21 | Op2Expr Pos Expr Op2 Expr
22 | Op1Expr Pos Op1 Expr
26 | FunExpr Pos String [Expr] [FieldSelector]
28 | TupleExpr Pos (Expr, Expr)
29 :: VarDef = VarDef String [FieldSelector]
30 :: FieldSelector = FieldHd | FieldTl | FieldFst | FieldSnd
31 :: Op1 = UnNegation | UnMinus
32 :: Op2 = BiPlus | BiMinus | BiTimes | BiDivide | BiMod | BiEquals | BiLesser |
33 BiGreater | BiLesserEq | BiGreaterEq | BiUnEqual | BiAnd | BiOr | BiCons
34 :: FunDecl = FunDecl Pos String [String] (Maybe Type) [VarDecl] [Stmt]
36 = IfStmt Expr [Stmt] [Stmt]
37 | WhileStmt Expr [Stmt]
39 | FunStmt String [Expr] [FieldSelector]
40 | ReturnStmt (Maybe Expr)
43 instance toString Type
45 instance toString FieldSelector
47 instance toString Expr
48 instance toString VarDecl