Module "TableRBT" Nothing [(ImportDecl (1,1) "Prelude" False Nothing Nothing) ,(ImportDecl (15,1) "RedBlackTree" True (Just "RBT") Nothing) ,(TypeDecl (20,1) (Ident "TableRBT" 0) [(Ident "key" 0),(Ident "a" 0)] (ConstructorType (QualIdent (Just "RBT") (Ident "RedBlackTree" 0)) [(TupleType [(VariableType (Ident "key" 0)),(VariableType (Ident "a" 0))])])) ,(TypeSig (23,1) [(Ident "emptyTableRBT" 0)] (ArrowType (ArrowType (VariableType (Ident "a" 0)) (ArrowType (VariableType (Ident "a" 0)) (ConstructorType (QualIdent Nothing (Ident "Bool" 0)) []))) (ConstructorType (QualIdent Nothing (Ident "TableRBT" 0)) [(VariableType (Ident "a" 0)),(VariableType (Ident "_" 0))]))) ,(FunctionDecl (24,1) (Ident "emptyTableRBT" 0) [(Equation (24,1) (FunLhs (Ident "emptyTableRBT" 0) [(VariablePattern (Ident "lt" 2))]) (SimpleRhs (24,20) (Apply (Apply (Apply (Variable (QualIdent (Just "RedBlackTree") (Ident "empty" 0))) (Paren (Lambda [(VariablePattern (Ident "x" 4)),(VariablePattern (Ident "y" 4))] (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "fst" 0))) (Variable (QualIdent Nothing (Ident "x" 4)))) (InfixOp (QualIdent (Just "Prelude") (Ident "==" 0))) (Apply (Variable (QualIdent (Just "Prelude") (Ident "fst" 0))) (Variable (QualIdent Nothing (Ident "y" 4)))))))) (Paren (Lambda [(VariablePattern (Ident "x" 5)),(VariablePattern (Ident "y" 5))] (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "fst" 0))) (Variable (QualIdent Nothing (Ident "x" 5)))) (InfixOp (QualIdent (Just "Prelude") (Ident "==" 0))) (Apply (Variable (QualIdent (Just "Prelude") (Ident "fst" 0))) (Variable (QualIdent Nothing (Ident "y" 5)))))))) (Paren (Lambda [(VariablePattern (Ident "x" 6)),(VariablePattern (Ident "y" 6))] (Apply (Apply (Variable (QualIdent Nothing (Ident "lt" 2))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "fst" 0))) (Variable (QualIdent Nothing (Ident "x" 6)))))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "fst" 0))) (Variable (QualIdent Nothing (Ident "y" 6))))))))) []))]) ,(TypeSig (29,1) [(Ident "isEmptyTable" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "TableRBT" 0)) [(VariableType (Ident "_" 0)),(VariableType (Ident "_" 0))]) (ConstructorType (QualIdent Nothing (Ident "Bool" 0)) []))) ,(FunctionDecl (30,1) (Ident "isEmptyTable" 0) [(Equation (30,1) (FunLhs (Ident "isEmptyTable" 0) []) (SimpleRhs (30,16) (Variable (QualIdent (Just "RedBlackTree") (Ident "isEmpty" 0))) []))]) ,(TypeSig (37,1) [(Ident "lookupRBT" 0)] (ArrowType (VariableType (Ident "key" 0)) (ArrowType (ConstructorType (QualIdent Nothing (Ident "TableRBT" 0)) [(VariableType (Ident "key" 0)),(VariableType (Ident "a" 0))]) (ConstructorType (QualIdent Nothing (Ident "Maybe" 0)) [(VariableType (Ident "a" 0))])))) ,(FunctionDecl (38,1) (Ident "lookupRBT" 0) [(Equation (38,1) (FunLhs (Ident "lookupRBT" 0) [(VariablePattern (Ident "k" 9))]) (SimpleRhs (38,15) (InfixApply (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "maybe" 0))) (Constructor (QualIdent (Just "Prelude") (Ident "Nothing" 0)))) (Paren (InfixApply (Constructor (QualIdent (Just "Prelude") (Ident "Just" 0))) (InfixOp (QualIdent (Just "Prelude") (Ident "." 0))) (Variable (QualIdent (Just "Prelude") (Ident "snd" 0)))))) (InfixOp (QualIdent (Just "Prelude") (Ident "." 0))) (Apply (Variable (QualIdent (Just "RedBlackTree") (Ident "lookup" 0))) (Tuple [(Variable (QualIdent Nothing (Ident "k" 9))),(Variable (QualIdent (Just "Prelude") (Ident "failed" 0)))]))) []))]) ,(TypeSig (41,1) [(Ident "updateRBT" 0)] (ArrowType (VariableType (Ident "key" 0)) (ArrowType (VariableType (Ident "a" 0)) (ArrowType (ConstructorType (QualIdent Nothing (Ident "TableRBT" 0)) [(VariableType (Ident "key" 0)),(VariableType (Ident "a" 0))]) (ConstructorType (QualIdent Nothing (Ident "TableRBT" 0)) [(VariableType (Ident "key" 0)),(VariableType (Ident "a" 0))]))))) ,(FunctionDecl (42,1) (Ident "updateRBT" 0) [(Equation (42,1) (FunLhs (Ident "updateRBT" 0) [(VariablePattern (Ident "k" 11)),(VariablePattern (Ident "e" 11))]) (SimpleRhs (42,17) (Apply (Variable (QualIdent (Just "RedBlackTree") (Ident "update" 0))) (Tuple [(Variable (QualIdent Nothing (Ident "k" 11))),(Variable (QualIdent Nothing (Ident "e" 11)))])) []))]) ,(TypeSig (45,1) [(Ident "tableRBT2list" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "TableRBT" 0)) [(VariableType (Ident "key" 0)),(VariableType (Ident "a" 0))]) (ListType (TupleType [(VariableType (Ident "key" 0)),(VariableType (Ident "a" 0))])))) ,(FunctionDecl (46,1) (Ident "tableRBT2list" 0) [(Equation (46,1) (FunLhs (Ident "tableRBT2list" 0) []) (SimpleRhs (46,17) (Variable (QualIdent (Just "RedBlackTree") (Ident "tree2list" 0))) []))]) ,(TypeSig (48,1) [(Ident "deleteRBT" 0)] (ArrowType (VariableType (Ident "key" 0)) (ArrowType (ConstructorType (QualIdent Nothing (Ident "TableRBT" 0)) [(VariableType (Ident "key" 0)),(VariableType (Ident "a" 0))]) (ConstructorType (QualIdent Nothing (Ident "TableRBT" 0)) [(VariableType (Ident "key" 0)),(VariableType (Ident "a" 0))])))) ,(FunctionDecl (49,1) (Ident "deleteRBT" 0) [(Equation (49,1) (FunLhs (Ident "deleteRBT" 0) [(VariablePattern (Ident "key" 15))]) (SimpleRhs (49,17) (Apply (Variable (QualIdent (Just "RedBlackTree") (Ident "delete" 0))) (Tuple [(Variable (QualIdent Nothing (Ident "key" 15))),(Variable (QualIdent (Just "Prelude") (Ident "failed" 0)))])) []))]) ]