Module "CSV" (Just (Exporting (10,11) [(Export (QualIdent Nothing (Ident "showCSV" 0))),(Export (QualIdent Nothing (Ident "readCSV" 0))),(Export (QualIdent Nothing (Ident "readCSVWithDelims" 0))),(Export (QualIdent Nothing (Ident "writeCSVFile" 0))),(Export (QualIdent Nothing (Ident "readCSVFile" 0))),(Export (QualIdent Nothing (Ident "readCSVFileWithDelims" 0)))])) [(ImportDecl (1,1) "Prelude" False Nothing Nothing) ,(ImportDecl (13,1) "List" False Nothing (Just (Importing (13,12) [(Import (Ident "intersperse" 0))]))) ,(TypeSig (19,1) [(Ident "writeCSVFile" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ArrowType (ListType (ListType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []))) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [])])))) ,(FunctionDecl (20,1) (Ident "writeCSVFile" 0) [(Equation (20,1) (FunLhs (Ident "writeCSVFile" 0) [(VariablePattern (Ident "fname" 2)),(VariablePattern (Ident "rows" 2))]) (SimpleRhs (20,27) (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "writeFile" 0))) (Variable (QualIdent Nothing (Ident "fname" 2)))) (Paren (Apply (Variable (QualIdent (Just "CSV") (Ident "showCSV" 0))) (Variable (QualIdent Nothing (Ident "rows" 2)))))) []))]) ,(TypeSig (24,1) [(Ident "showCSV" 0)] (ArrowType (ListType (ListType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []))) (ConstructorType (QualIdent Nothing (Ident "String" 0)) []))) ,(FunctionDecl (25,1) (Ident "showCSV" 0) [(Equation (25,1) (FunLhs (Ident "showCSV" 0) [(VariablePattern (Ident "rows" 4))]) (SimpleRhs (25,16) (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "concatMap" 0))) (Variable (QualIdent (Just "CSV") (Ident "showCSVLine" 0)))) (Variable (QualIdent Nothing (Ident "rows" 4)))) []))]) ,(TypeSig (28,1) [(Ident "showCSVLine" 0)] (ArrowType (ListType (ConstructorType (QualIdent Nothing (Ident "String" 0)) [])) (ConstructorType (QualIdent Nothing (Ident "String" 0)) []))) ,(FunctionDecl (29,1) (Ident "showCSVLine" 0) [(Equation (29,1) (FunLhs (Ident "showCSVLine" 0) [(VariablePattern (Ident "row" 6))]) (SimpleRhs (29,19) (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "concat" 0))) (Paren (Apply (Apply (Variable (QualIdent (Just "List") (Ident "intersperse" 0))) (Literal (String ","))) (Paren (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "map" 0))) (Variable (QualIdent Nothing (Ident "convert" 7)))) (Variable (QualIdent Nothing (Ident "row" 6)))))))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String "\n"))) [(FunctionDecl (32,4) (Ident "convert" 7) [(Equation (32,4) (FunLhs (Ident "convert" 7) [(VariablePattern (Ident "s" 8))]) (SimpleRhs (33,7) (IfThenElse (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "any" 0))) (Paren (Lambda [(VariablePattern (Ident "c" 10))] (InfixApply (Variable (QualIdent Nothing (Ident "c" 10))) (InfixOp (QualIdent (Just "Prelude") (Ident "elem" 0))) (List [(Literal (Char '"')),(Literal (Char ',')),(Literal (Char ';')),(Literal (Char ':'))]))))) (Variable (QualIdent Nothing (Ident "s" 8)))) (InfixApply (Literal (Char '"')) (InfixConstr (QualIdent Nothing (Ident ":" 0))) (InfixApply (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "concatMap" 0))) (Paren (Lambda [(VariablePattern (Ident "c" 11))] (IfThenElse (InfixApply (Variable (QualIdent Nothing (Ident "c" 11))) (InfixOp (QualIdent (Just "Prelude") (Ident "==" 0))) (Literal (Char '"'))) (List [(Variable (QualIdent Nothing (Ident "c" 11))),(Variable (QualIdent Nothing (Ident "c" 11)))]) (List [(Variable (QualIdent Nothing (Ident "c" 11)))]))))) (Variable (QualIdent Nothing (Ident "s" 8)))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String "\"")))) (Variable (QualIdent Nothing (Ident "s" 8)))) []))])]))]) ,(TypeSig (41,1) [(Ident "readCSVFile" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(ListType (ListType (ConstructorType (QualIdent Nothing (Ident "String" 0)) [])))]))) ,(FunctionDecl (42,1) (Ident "readCSVFile" 0) [(Equation (42,1) (FunLhs (Ident "readCSVFile" 0) []) (SimpleRhs (42,15) (Apply (Variable (QualIdent (Just "CSV") (Ident "readCSVFileWithDelims" 0))) (List [(Literal (Char ','))])) []))]) ,(TypeSig (48,1) [(Ident "readCSVFileWithDelims" 0)] (ArrowType (ListType (ConstructorType (QualIdent Nothing (Ident "Char" 0)) [])) (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(ListType (ListType (ConstructorType (QualIdent Nothing (Ident "String" 0)) [])))])))) ,(FunctionDecl (49,1) (Ident "readCSVFileWithDelims" 0) [(Equation (49,1) (FunLhs (Ident "readCSVFileWithDelims" 0) [(VariablePattern (Ident "delims" 14)),(VariablePattern (Ident "fname" 14))]) (SimpleRhs (49,38) (Do [(StmtBind (VariablePattern (Ident "contents" 16)) (Apply (Variable (QualIdent (Just "Prelude") (Ident "readFile" 0))) (Variable (QualIdent Nothing (Ident "fname" 14)))))] (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Paren (Apply (Apply (Variable (QualIdent (Just "CSV") (Ident "readCSVWithDelims" 0))) (Variable (QualIdent Nothing (Ident "delims" 14)))) (Variable (QualIdent Nothing (Ident "contents" 16))))))) []))]) ,(TypeSig (56,1) [(Ident "readCSV" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ListType (ListType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []))))) ,(FunctionDecl (57,1) (Ident "readCSV" 0) [(Equation (57,1) (FunLhs (Ident "readCSV" 0) []) (SimpleRhs (57,11) (Apply (Variable (QualIdent (Just "CSV") (Ident "readCSVWithDelims" 0))) (List [(Literal (Char ','))])) []))]) ,(TypeSig (63,1) [(Ident "readCSVWithDelims" 0)] (ArrowType (ListType (ConstructorType (QualIdent Nothing (Ident "Char" 0)) [])) (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ListType (ListType (ConstructorType (QualIdent Nothing (Ident "String" 0)) [])))))) ,(FunctionDecl (64,1) (Ident "readCSVWithDelims" 0) [(Equation (64,1) (FunLhs (Ident "readCSVWithDelims" 0) [(VariablePattern (Ident "delims" 19)),(VariablePattern (Ident "str" 19))]) (SimpleRhs (64,32) (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "map" 0))) (Paren (Apply (Variable (QualIdent (Just "CSV") (Ident "components" 0))) (Variable (QualIdent Nothing (Ident "delims" 19)))))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "lines" 0))) (Variable (QualIdent Nothing (Ident "str" 19)))))) []))]) ,(TypeSig (67,1) [(Ident "components" 0)] (ArrowType (ListType (ConstructorType (QualIdent Nothing (Ident "Char" 0)) [])) (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ListType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []))))) ,(FunctionDecl (68,1) (Ident "components" 0) [(Equation (68,1) (FunLhs (Ident "components" 0) [(VariablePattern (Ident "_" 22)),(ListPattern [])]) (SimpleRhs (68,19) (List [(List [])]) [])),(Equation (69,1) (FunLhs (Ident "components" 0) [(VariablePattern (Ident "delims" 24)),(ParenPattern (InfixPattern (VariablePattern (Ident "c" 24)) (QualIdent Nothing (Ident ":" 0)) (VariablePattern (Ident "cs" 24))))]) (SimpleRhs (70,3) (IfThenElse (InfixApply (Variable (QualIdent Nothing (Ident "c" 24))) (InfixOp (QualIdent (Just "Prelude") (Ident "==" 0))) (Literal (Char '"'))) (Apply (Variable (QualIdent Nothing (Ident "breakString" 25))) (Variable (QualIdent Nothing (Ident "cs" 24)))) (Let [(PatternDecl (71,22) (TuplePattern [(VariablePattern (Ident "e" 37)),(VariablePattern (Ident "s" 37))]) (SimpleRhs (71,30) (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "break" 0))) (RightSection (InfixOp (QualIdent (Just "Prelude") (Ident "elem" 0))) (Variable (QualIdent Nothing (Ident "delims" 24))))) (Paren (InfixApply (Variable (QualIdent Nothing (Ident "c" 24))) (InfixConstr (QualIdent Nothing (Ident ":" 0))) (Variable (QualIdent Nothing (Ident "cs" 24)))))) []))] (InfixApply (Variable (QualIdent Nothing (Ident "e" 37))) (InfixConstr (QualIdent Nothing (Ident ":" 0))) (Paren (IfThenElse (Apply (Variable (QualIdent (Just "Prelude") (Ident "null" 0))) (Variable (QualIdent Nothing (Ident "s" 37)))) (List []) (Apply (Apply (Variable (QualIdent (Just "CSV") (Ident "components" 0))) (Variable (QualIdent Nothing (Ident "delims" 24)))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "tail" 0))) (Variable (QualIdent Nothing (Ident "s" 37))))))))))) [(FunctionDecl (74,4) (Ident "breakString" 25) [(Equation (74,4) (FunLhs (Ident "breakString" 25) [(ListPattern [])]) (SimpleRhs (74,21) (Variable (QualIdent Nothing (Ident "delimError" 25))) [])),(Equation (75,4) (FunLhs (Ident "breakString" 25) [(ListPattern [(VariablePattern (Ident "x" 28))])]) (SimpleRhs (75,22) (IfThenElse (InfixApply (Variable (QualIdent Nothing (Ident "x" 28))) (InfixOp (QualIdent (Just "Prelude") (Ident "==" 0))) (Literal (Char '"'))) (List [(List [])]) (Variable (QualIdent Nothing (Ident "delimError" 25)))) [])),(Equation (77,4) (FunLhs (Ident "breakString" 25) [(ParenPattern (InfixPattern (VariablePattern (Ident "x" 30)) (QualIdent Nothing (Ident ":" 0)) (InfixPattern (VariablePattern (Ident "y" 30)) (QualIdent Nothing (Ident ":" 0)) (VariablePattern (Ident "zs" 30)))))]) (GuardedRhs [(CondExpr (77,25) (InfixApply (InfixApply (Variable (QualIdent Nothing (Ident "x" 30))) (InfixOp (QualIdent (Just "Prelude") (Ident "==" 0))) (Literal (Char '"'))) (InfixOp (QualIdent (Just "Prelude") (Ident "&&" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "y" 30))) (InfixOp (QualIdent (Just "Prelude") (Ident "==" 0))) (Literal (Char '"')))) (Let [(PatternDecl (77,50) (ParenPattern (InfixPattern (VariablePattern (Ident "b" 32)) (QualIdent Nothing (Ident ":" 0)) (VariablePattern (Ident "bs" 32)))) (SimpleRhs (77,59) (Apply (Variable (QualIdent Nothing (Ident "breakString" 25))) (Variable (QualIdent Nothing (Ident "zs" 30)))) []))] (InfixApply (Paren (InfixApply (Variable (QualIdent Nothing (Ident "x" 30))) (InfixConstr (QualIdent Nothing (Ident ":" 0))) (Variable (QualIdent Nothing (Ident "b" 32))))) (InfixConstr (QualIdent Nothing (Ident ":" 0))) (Variable (QualIdent Nothing (Ident "bs" 32)))))),(CondExpr (79,25) (InfixApply (InfixApply (Variable (QualIdent Nothing (Ident "x" 30))) (InfixOp (QualIdent (Just "Prelude") (Ident "==" 0))) (Literal (Char '"'))) (InfixOp (QualIdent (Just "Prelude") (Ident "&&" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "y" 30))) (InfixOp (QualIdent (Just "Prelude") (Ident "elem" 0))) (Variable (QualIdent Nothing (Ident "delims" 24))))) (InfixApply (List []) (InfixConstr (QualIdent Nothing (Ident ":" 0))) (Apply (Apply (Variable (QualIdent (Just "CSV") (Ident "components" 0))) (Variable (QualIdent Nothing (Ident "delims" 24)))) (Variable (QualIdent Nothing (Ident "zs" 30)))))),(CondExpr (80,25) (Variable (QualIdent (Just "Prelude") (Ident "otherwise" 0))) (Let [(PatternDecl (80,43) (ParenPattern (InfixPattern (VariablePattern (Ident "b" 34)) (QualIdent Nothing (Ident ":" 0)) (VariablePattern (Ident "bs" 34)))) (SimpleRhs (80,52) (Apply (Variable (QualIdent Nothing (Ident "breakString" 25))) (Paren (InfixApply (Variable (QualIdent Nothing (Ident "y" 30))) (InfixConstr (QualIdent Nothing (Ident ":" 0))) (Variable (QualIdent Nothing (Ident "zs" 30)))))) []))] (InfixApply (Paren (InfixApply (Variable (QualIdent Nothing (Ident "x" 30))) (InfixConstr (QualIdent Nothing (Ident ":" 0))) (Variable (QualIdent Nothing (Ident "b" 34))))) (InfixConstr (QualIdent Nothing (Ident ":" 0))) (Variable (QualIdent Nothing (Ident "bs" 34))))))] []))]),(PatternDecl (83,4) (VariablePattern (Ident "delimError" 25)) (SimpleRhs (83,18) (Apply (Variable (QualIdent (Just "Prelude") (Ident "error" 0))) (Literal (String "Missing closing delimiter in CSV record!"))) []))]))]) ]