Module "SetRBT" Nothing [(ImportDecl (1,1) "Prelude" False Nothing Nothing) ,(ImportDecl (13,1) "RedBlackTree" True (Just "RBT") Nothing) ,(ImportDecl (14,1) "Maybe" False Nothing (Just (Importing (14,14) [(Import (Ident "isJust" 0))]))) ,(TypeDecl (19,1) (Ident "SetRBT" 0) [(Ident "a" 0)] (ConstructorType (QualIdent (Just "RBT") (Ident "RedBlackTree" 0)) [(VariableType (Ident "a" 0))])) ,(FunctionDecl (24,1) (Ident "emptySetRBT" 0) [(Equation (24,1) (FunLhs (Ident "emptySetRBT" 0) []) (SimpleRhs (24,15) (Apply (Apply (Variable (QualIdent (Just "RedBlackTree") (Ident "empty" 0))) (Variable (QualIdent (Just "Prelude") (Ident "==" 0)))) (Variable (QualIdent (Just "Prelude") (Ident "==" 0)))) []))]) ,(TypeSig (30,1) [(Ident "elemRBT" 0)] (ArrowType (VariableType (Ident "a" 0)) (ArrowType (ConstructorType (QualIdent Nothing (Ident "SetRBT" 0)) [(VariableType (Ident "a" 0))]) (ConstructorType (QualIdent Nothing (Ident "Bool" 0)) [])))) ,(FunctionDecl (31,1) (Ident "elemRBT" 0) [(Equation (31,1) (FunLhs (Ident "elemRBT" 0) [(VariablePattern (Ident "e" 4))]) (SimpleRhs (31,13) (InfixApply (Variable (QualIdent (Just "Maybe") (Ident "isJust" 0))) (InfixOp (QualIdent (Just "Prelude") (Ident "." 0))) (Paren (Apply (Variable (QualIdent (Just "RedBlackTree") (Ident "lookup" 0))) (Variable (QualIdent Nothing (Ident "e" 4)))))) []))]) ,(TypeSig (34,1) [(Ident "insertRBT" 0)] (ArrowType (VariableType (Ident "a" 0)) (ArrowType (ConstructorType (QualIdent Nothing (Ident "SetRBT" 0)) [(VariableType (Ident "a" 0))]) (ConstructorType (QualIdent Nothing (Ident "SetRBT" 0)) [(VariableType (Ident "a" 0))])))) ,(FunctionDecl (35,1) (Ident "insertRBT" 0) [(Equation (35,1) (FunLhs (Ident "insertRBT" 0) []) (SimpleRhs (35,13) (Variable (QualIdent (Just "RedBlackTree") (Ident "update" 0))) []))]) ,(TypeSig (41,1) [(Ident "insertMultiRBT" 0)] (ArrowType (VariableType (Ident "a" 0)) (ArrowType (ConstructorType (QualIdent Nothing (Ident "SetRBT" 0)) [(VariableType (Ident "a" 0))]) (ConstructorType (QualIdent Nothing (Ident "SetRBT" 0)) [(VariableType (Ident "a" 0))])))) ,(FunctionDecl (42,1) (Ident "insertMultiRBT" 0) [(Equation (42,1) (FunLhs (Ident "insertMultiRBT" 0) [(VariablePattern (Ident "e" 8))]) (SimpleRhs (42,20) (InfixApply (Apply (Variable (QualIdent (Just "RedBlackTree") (Ident "setInsertEquivalence" 0))) (Variable (QualIdent (Just "Prelude") (Ident "==" 0)))) (InfixOp (QualIdent (Just "Prelude") (Ident "." 0))) (InfixApply (Apply (Variable (QualIdent (Just "RedBlackTree") (Ident "update" 0))) (Variable (QualIdent Nothing (Ident "e" 8)))) (InfixOp (QualIdent (Just "Prelude") (Ident "." 0))) (Apply (Variable (QualIdent (Just "RedBlackTree") (Ident "setInsertEquivalence" 0))) (Paren (Lambda [(VariablePattern (Ident "_" 11)),(VariablePattern (Ident "_" 12))] (Constructor (QualIdent (Just "Prelude") (Ident "False" 0)))))))) []))]) ,(TypeSig (48,1) [(Ident "deleteRBT" 0)] (ArrowType (VariableType (Ident "a" 0)) (ArrowType (ConstructorType (QualIdent Nothing (Ident "SetRBT" 0)) [(VariableType (Ident "a" 0))]) (ConstructorType (QualIdent Nothing (Ident "SetRBT" 0)) [(VariableType (Ident "a" 0))])))) ,(FunctionDecl (49,1) (Ident "deleteRBT" 0) [(Equation (49,1) (FunLhs (Ident "deleteRBT" 0) []) (SimpleRhs (49,13) (Variable (QualIdent (Just "RedBlackTree") (Ident "delete" 0))) []))]) ,(TypeSig (52,1) [(Ident "setRBT2list" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "SetRBT" 0)) [(VariableType (Ident "a" 0))]) (ListType (VariableType (Ident "a" 0))))) ,(FunctionDecl (53,1) (Ident "setRBT2list" 0) [(Equation (53,1) (FunLhs (Ident "setRBT2list" 0) []) (SimpleRhs (53,15) (Variable (QualIdent (Just "RedBlackTree") (Ident "tree2list" 0))) []))]) ,(TypeSig (58,1) [(Ident "unionRBT" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "SetRBT" 0)) [(VariableType (Ident "a" 0))]) (ArrowType (ConstructorType (QualIdent Nothing (Ident "SetRBT" 0)) [(VariableType (Ident "a" 0))]) (ConstructorType (QualIdent Nothing (Ident "SetRBT" 0)) [(VariableType (Ident "a" 0))])))) ,(FunctionDecl (59,1) (Ident "unionRBT" 0) [(Equation (59,1) (FunLhs (Ident "unionRBT" 0) [(VariablePattern (Ident "s1" 17)),(VariablePattern (Ident "s2" 17))]) (SimpleRhs (59,18) (Apply (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "foldr" 0))) (Variable (QualIdent (Just "SetRBT") (Ident "insertRBT" 0)))) (Variable (QualIdent Nothing (Ident "s2" 17)))) (Paren (Apply (Variable (QualIdent (Just "SetRBT") (Ident "setRBT2list" 0))) (Variable (QualIdent Nothing (Ident "s1" 17)))))) []))]) ,(TypeSig (65,1) [(Ident "intersectRBT" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "SetRBT" 0)) [(VariableType (Ident "a" 0))]) (ArrowType (ConstructorType (QualIdent Nothing (Ident "SetRBT" 0)) [(VariableType (Ident "a" 0))]) (ConstructorType (QualIdent Nothing (Ident "SetRBT" 0)) [(VariableType (Ident "a" 0))])))) ,(FunctionDecl (66,1) (Ident "intersectRBT" 0) [(Equation (66,1) (FunLhs (Ident "intersectRBT" 0) [(VariablePattern (Ident "s1" 19)),(VariablePattern (Ident "s2" 19))]) (SimpleRhs (66,22) (Apply (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "foldr" 0))) (Variable (QualIdent (Just "SetRBT") (Ident "insertRBT" 0)))) (Paren (Apply (Variable (QualIdent (Just "RedBlackTree") (Ident "newTreeLike" 0))) (Variable (QualIdent Nothing (Ident "s1" 19)))))) (Paren (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "filter" 0))) (Paren (Lambda [(VariablePattern (Ident "e" 21))] (Apply (Apply (Variable (QualIdent (Just "SetRBT") (Ident "elemRBT" 0))) (Variable (QualIdent Nothing (Ident "e" 21)))) (Variable (QualIdent Nothing (Ident "s2" 19))))))) (Paren (Apply (Variable (QualIdent (Just "SetRBT") (Ident "setRBT2list" 0))) (Variable (QualIdent Nothing (Ident "s1" 19)))))))) []))]) ,(TypeSig (73,1) [(Ident "sortRBT" 0)] (ArrowType (ArrowType (VariableType (Ident "a" 0)) (ArrowType (VariableType (Ident "a" 0)) (ConstructorType (QualIdent Nothing (Ident "Bool" 0)) []))) (ArrowType (ListType (VariableType (Ident "a" 0))) (ListType (VariableType (Ident "a" 0)))))) ,(FunctionDecl (74,1) (Ident "sortRBT" 0) [(Equation (74,1) (FunLhs (Ident "sortRBT" 0) []) (SimpleRhs (74,11) (Variable (QualIdent (Just "RedBlackTree") (Ident "sort" 0))) []))]) ]