Module "FileGoodies" (Just (Exporting (8,19) [(Export (QualIdent Nothing (Ident "separatorChar" 0))),(Export (QualIdent Nothing (Ident "pathSeparatorChar" 0))),(Export (QualIdent Nothing (Ident "suffixSeparatorChar" 0))),(Export (QualIdent Nothing (Ident "isAbsolute" 0))),(Export (QualIdent Nothing (Ident "dirName" 0))),(Export (QualIdent Nothing (Ident "baseName" 0))),(Export (QualIdent Nothing (Ident "splitDirectoryBaseName" 0))),(Export (QualIdent Nothing (Ident "stripSuffix" 0))),(Export (QualIdent Nothing (Ident "fileSuffix" 0))),(Export (QualIdent Nothing (Ident "splitBaseName" 0))),(Export (QualIdent Nothing (Ident "splitPath" 0))),(Export (QualIdent Nothing (Ident "findFileInPath" 0))),(Export (QualIdent Nothing (Ident "lookupFileInPath" 0))),(Export (QualIdent Nothing (Ident "getFileInPath" 0))),(Export (QualIdent Nothing (Ident "replaceFileName" 0)))])) [(ImportDecl (1,1) "Prelude" False Nothing Nothing) ,(ImportDecl (14,1) "Directory" False Nothing Nothing) ,(ImportDecl (15,1) "List" False Nothing (Just (Importing (15,12) [(Import (Ident "intersperse" 0))]))) ,(TypeSig (19,1) [(Ident "separatorChar" 0)] (ConstructorType (QualIdent Nothing (Ident "Char" 0)) [])) ,(FunctionDecl (20,1) (Ident "separatorChar" 0) [(Equation (20,1) (FunLhs (Ident "separatorChar" 0) []) (SimpleRhs (20,17) (Literal (Char '/')) []))]) ,(TypeSig (24,1) [(Ident "pathSeparatorChar" 0)] (ConstructorType (QualIdent Nothing (Ident "Char" 0)) [])) ,(FunctionDecl (25,1) (Ident "pathSeparatorChar" 0) [(Equation (25,1) (FunLhs (Ident "pathSeparatorChar" 0) []) (SimpleRhs (25,21) (Literal (Char ':')) []))]) ,(TypeSig (29,1) [(Ident "suffixSeparatorChar" 0)] (ConstructorType (QualIdent Nothing (Ident "Char" 0)) [])) ,(FunctionDecl (30,1) (Ident "suffixSeparatorChar" 0) [(Equation (30,1) (FunLhs (Ident "suffixSeparatorChar" 0) []) (SimpleRhs (30,23) (Literal (Char '.')) []))]) ,(TypeSig (33,1) [(Ident "isAbsolute" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ConstructorType (QualIdent Nothing (Ident "Bool" 0)) []))) ,(FunctionDecl (34,1) (Ident "isAbsolute" 0) [(Equation (34,1) (FunLhs (Ident "isAbsolute" 0) [(ParenPattern (InfixPattern (VariablePattern (Ident "c" 8)) (QualIdent Nothing (Ident ":" 0)) (VariablePattern (Ident "_" 9))))]) (SimpleRhs (34,20) (InfixApply (Variable (QualIdent Nothing (Ident "c" 8))) (InfixOp (QualIdent (Just "Prelude") (Ident "==" 0))) (Variable (QualIdent (Just "FileGoodies") (Ident "separatorChar" 0)))) []))]) ,(TypeSig (38,1) [(Ident "dirName" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ConstructorType (QualIdent Nothing (Ident "String" 0)) []))) ,(FunctionDecl (39,1) (Ident "dirName" 0) [(Equation (39,1) (FunLhs (Ident "dirName" 0) [(VariablePattern (Ident "name" 11))]) (SimpleRhs (39,16) (Apply (Variable (QualIdent (Just "Prelude") (Ident "fst" 0))) (Paren (Apply (Variable (QualIdent (Just "FileGoodies") (Ident "splitDirectoryBaseName" 0))) (Variable (QualIdent Nothing (Ident "name" 11)))))) []))]) ,(TypeSig (42,1) [(Ident "baseName" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ConstructorType (QualIdent Nothing (Ident "String" 0)) []))) ,(FunctionDecl (43,1) (Ident "baseName" 0) [(Equation (43,1) (FunLhs (Ident "baseName" 0) [(VariablePattern (Ident "name" 13))]) (SimpleRhs (43,17) (Apply (Variable (QualIdent (Just "Prelude") (Ident "snd" 0))) (Paren (Apply (Variable (QualIdent (Just "FileGoodies") (Ident "splitDirectoryBaseName" 0))) (Variable (QualIdent Nothing (Ident "name" 13)))))) []))]) ,(TypeSig (47,1) [(Ident "splitDirectoryBaseName" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (TupleType [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "String" 0)) [])]))) ,(FunctionDecl (48,1) (Ident "splitDirectoryBaseName" 0) [(Equation (48,1) (FunLhs (Ident "splitDirectoryBaseName" 0) [(VariablePattern (Ident "name" 15))]) (SimpleRhs (49,3) (Let [(PatternDecl (49,7) (TuplePattern [(VariablePattern (Ident "rbase" 17)),(VariablePattern (Ident "rdir" 17))]) (SimpleRhs (49,22) (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "break" 0))) (RightSection (InfixOp (QualIdent (Just "Prelude") (Ident "==" 0))) (Variable (QualIdent (Just "FileGoodies") (Ident "separatorChar" 0))))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "reverse" 0))) (Variable (QualIdent Nothing (Ident "name" 15)))))) []))] (IfThenElse (Apply (Variable (QualIdent (Just "Prelude") (Ident "null" 0))) (Variable (QualIdent Nothing (Ident "rdir" 17)))) (Tuple [(Literal (String ".")),(Apply (Variable (QualIdent (Just "Prelude") (Ident "reverse" 0))) (Variable (QualIdent Nothing (Ident "rbase" 17))))]) (Tuple [(Apply (Variable (QualIdent (Just "Prelude") (Ident "reverse" 0))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "tail" 0))) (Variable (QualIdent Nothing (Ident "rdir" 17)))))),(Apply (Variable (QualIdent (Just "Prelude") (Ident "reverse" 0))) (Variable (QualIdent Nothing (Ident "rbase" 17))))]))) []))]) ,(TypeSig (54,1) [(Ident "stripSuffix" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ConstructorType (QualIdent Nothing (Ident "String" 0)) []))) ,(FunctionDecl (55,1) (Ident "stripSuffix" 0) [(Equation (55,1) (FunLhs (Ident "stripSuffix" 0) []) (SimpleRhs (55,15) (InfixApply (Variable (QualIdent (Just "Prelude") (Ident "fst" 0))) (InfixOp (QualIdent (Just "Prelude") (Ident "." 0))) (Variable (QualIdent (Just "FileGoodies") (Ident "splitBaseName" 0)))) []))]) ,(TypeSig (58,1) [(Ident "fileSuffix" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ConstructorType (QualIdent Nothing (Ident "String" 0)) []))) ,(FunctionDecl (59,1) (Ident "fileSuffix" 0) [(Equation (59,1) (FunLhs (Ident "fileSuffix" 0) []) (SimpleRhs (59,14) (InfixApply (Variable (QualIdent (Just "Prelude") (Ident "snd" 0))) (InfixOp (QualIdent (Just "Prelude") (Ident "." 0))) (Variable (QualIdent (Just "FileGoodies") (Ident "splitBaseName" 0)))) []))]) ,(TypeSig (63,1) [(Ident "splitBaseName" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (TupleType [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "String" 0)) [])]))) ,(FunctionDecl (64,1) (Ident "splitBaseName" 0) [(Equation (64,1) (FunLhs (Ident "splitBaseName" 0) [(VariablePattern (Ident "name" 23))]) (SimpleRhs (64,22) (Let [(PatternDecl (64,26) (TuplePattern [(VariablePattern (Ident "rsuffix" 25)),(VariablePattern (Ident "rbase" 25))]) (SimpleRhs (64,44) (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "break" 0))) (RightSection (InfixOp (QualIdent (Just "Prelude") (Ident "==" 0))) (Variable (QualIdent (Just "FileGoodies") (Ident "suffixSeparatorChar" 0))))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "reverse" 0))) (Variable (QualIdent Nothing (Ident "name" 23)))))) []))] (IfThenElse (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "null" 0))) (Variable (QualIdent Nothing (Ident "rbase" 25)))) (InfixOp (QualIdent (Just "Prelude") (Ident "||" 0))) (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "elem" 0))) (Variable (QualIdent (Just "FileGoodies") (Ident "separatorChar" 0)))) (Variable (QualIdent Nothing (Ident "rsuffix" 25))))) (Tuple [(Variable (QualIdent Nothing (Ident "name" 23))),(Literal (String ""))]) (Tuple [(Apply (Variable (QualIdent (Just "Prelude") (Ident "reverse" 0))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "tail" 0))) (Variable (QualIdent Nothing (Ident "rbase" 25)))))),(Apply (Variable (QualIdent (Just "Prelude") (Ident "reverse" 0))) (Variable (QualIdent Nothing (Ident "rsuffix" 25))))]))) []))]) ,(TypeSig (70,1) [(Ident "splitPath" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ListType (ConstructorType (QualIdent Nothing (Ident "String" 0)) [])))) ,(FunctionDecl (71,1) (Ident "splitPath" 0) [(Equation (71,1) (FunLhs (Ident "splitPath" 0) [(ListPattern [])]) (SimpleRhs (71,16) (List []) [])),(Equation (72,1) (FunLhs (Ident "splitPath" 0) [(ParenPattern (InfixPattern (VariablePattern (Ident "x" 29)) (QualIdent Nothing (Ident ":" 0)) (VariablePattern (Ident "xs" 29))))]) (SimpleRhs (72,20) (Let [(PatternDecl (72,24) (TuplePattern [(VariablePattern (Ident "ys" 31)),(VariablePattern (Ident "zs" 31))]) (SimpleRhs (72,34) (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "break" 0))) (RightSection (InfixOp (QualIdent (Just "Prelude") (Ident "==" 0))) (Variable (QualIdent (Just "FileGoodies") (Ident "pathSeparatorChar" 0))))) (Paren (InfixApply (Variable (QualIdent Nothing (Ident "x" 29))) (InfixConstr (QualIdent Nothing (Ident ":" 0))) (Variable (QualIdent Nothing (Ident "xs" 29)))))) []))] (IfThenElse (Apply (Variable (QualIdent (Just "Prelude") (Ident "null" 0))) (Variable (QualIdent Nothing (Ident "zs" 31)))) (List [(Variable (QualIdent Nothing (Ident "ys" 31)))]) (InfixApply (Variable (QualIdent Nothing (Ident "ys" 31))) (InfixConstr (QualIdent Nothing (Ident ":" 0))) (Apply (Variable (QualIdent (Just "FileGoodies") (Ident "splitPath" 0))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "tail" 0))) (Variable (QualIdent Nothing (Ident "zs" 31))))))))) []))]) ,(TypeSig (78,1) [(Ident "findFileInPath" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ArrowType (ListType (ConstructorType (QualIdent Nothing (Ident "String" 0)) [])) (ArrowType (ListType (ConstructorType (QualIdent Nothing (Ident "String" 0)) [])) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(ConstructorType (QualIdent Nothing (Ident "Maybe" 0)) [(ConstructorType (QualIdent Nothing (Ident "String" 0)) [])])]))))) ,(FunctionDecl (79,1) (Ident "findFileInPath" 0) [(Equation (79,1) (FunLhs (Ident "findFileInPath" 0) []) (SimpleRhs (79,18) (Variable (QualIdent (Just "FileGoodies") (Ident "lookupFileInPath" 0))) []))]) ,(TypeSig (83,1) [(Ident "lookupFileInPath" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ArrowType (ListType (ConstructorType (QualIdent Nothing (Ident "String" 0)) [])) (ArrowType (ListType (ConstructorType (QualIdent Nothing (Ident "String" 0)) [])) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(ConstructorType (QualIdent Nothing (Ident "Maybe" 0)) [(ConstructorType (QualIdent Nothing (Ident "String" 0)) [])])]))))) ,(FunctionDecl (84,1) (Ident "lookupFileInPath" 0) [(Equation (84,1) (FunLhs (Ident "lookupFileInPath" 0) [(VariablePattern (Ident "file" 35)),(VariablePattern (Ident "suffixes" 35)),(VariablePattern (Ident "path" 35))]) (SimpleRhs (85,3) (IfThenElse (Apply (Variable (QualIdent (Just "FileGoodies") (Ident "isAbsolute" 0))) (Variable (QualIdent Nothing (Ident "file" 35)))) (Apply (Apply (Variable (QualIdent Nothing (Ident "lookupFirstFileWithSuffix" 36))) (Variable (QualIdent Nothing (Ident "file" 35)))) (Variable (QualIdent Nothing (Ident "suffixes" 35)))) (Apply (Variable (QualIdent Nothing (Ident "lookupFirstFile" 36))) (Variable (QualIdent Nothing (Ident "path" 35))))) [(FunctionDecl (89,4) (Ident "lookupFirstFile" 36) [(Equation (89,4) (FunLhs (Ident "lookupFirstFile" 36) [(ListPattern [])]) (SimpleRhs (89,25) (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Constructor (QualIdent (Just "Prelude") (Ident "Nothing" 0)))) [])),(Equation (90,4) (FunLhs (Ident "lookupFirstFile" 36) [(ParenPattern (InfixPattern (VariablePattern (Ident "dir" 39)) (QualIdent Nothing (Ident ":" 0)) (VariablePattern (Ident "dirs" 39))))]) (SimpleRhs (90,33) (Do [(StmtBind (VariablePattern (Ident "mbfile" 41)) (Apply (Apply (Variable (QualIdent Nothing (Ident "lookupFirstFileWithSuffix" 36))) (Paren (InfixApply (Variable (QualIdent Nothing (Ident "dir" 39))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent (Just "FileGoodies") (Ident "separatorChar" 0))) (InfixConstr (QualIdent Nothing (Ident ":" 0))) (Variable (QualIdent Nothing (Ident "file" 35))))))) (Variable (QualIdent Nothing (Ident "suffixes" 35)))))] (Apply (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "maybe" 0))) (Paren (Apply (Variable (QualIdent Nothing (Ident "lookupFirstFile" 36))) (Variable (QualIdent Nothing (Ident "dirs" 39)))))) (Paren (InfixApply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (InfixOp (QualIdent (Just "Prelude") (Ident "." 0))) (Constructor (QualIdent (Just "Prelude") (Ident "Just" 0)))))) (Variable (QualIdent Nothing (Ident "mbfile" 41))))) []))]),(FunctionDecl (94,4) (Ident "lookupFirstFileWithSuffix" 36) [(Equation (94,4) (FunLhs (Ident "lookupFirstFileWithSuffix" 36) [(VariablePattern (Ident "_" 43)),(ListPattern [])]) (SimpleRhs (94,37) (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Constructor (QualIdent (Just "Prelude") (Ident "Nothing" 0)))) [])),(Equation (95,4) (FunLhs (Ident "lookupFirstFileWithSuffix" 36) [(VariablePattern (Ident "f" 45)),(ParenPattern (InfixPattern (VariablePattern (Ident "suf" 45)) (QualIdent Nothing (Ident ":" 0)) (VariablePattern (Ident "sufs" 45))))]) (SimpleRhs (95,45) (Do [(StmtDecl [(PatternDecl (96,10) (VariablePattern (Ident "fsuf" 47)) (SimpleRhs (96,17) (InfixApply (Variable (QualIdent Nothing (Ident "f" 45))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Variable (QualIdent Nothing (Ident "suf" 45)))) []))]),(StmtBind (VariablePattern (Ident "exfile" 49)) (Apply (Variable (QualIdent (Just "Directory") (Ident "doesFileExist" 0))) (Variable (QualIdent Nothing (Ident "fsuf" 47)))))] (IfThenElse (Variable (QualIdent Nothing (Ident "exfile" 49))) (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Paren (Apply (Constructor (QualIdent (Just "Prelude") (Ident "Just" 0))) (Variable (QualIdent Nothing (Ident "fsuf" 47)))))) (Apply (Apply (Variable (QualIdent Nothing (Ident "lookupFirstFileWithSuffix" 36))) (Variable (QualIdent Nothing (Ident "f" 45)))) (Variable (QualIdent Nothing (Ident "sufs" 45)))))) []))])]))]) ,(TypeSig (103,1) [(Ident "getFileInPath" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ArrowType (ListType (ConstructorType (QualIdent Nothing (Ident "String" 0)) [])) (ArrowType (ListType (ConstructorType (QualIdent Nothing (Ident "String" 0)) [])) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(ConstructorType (QualIdent Nothing (Ident "String" 0)) [])]))))) ,(FunctionDecl (104,1) (Ident "getFileInPath" 0) [(Equation (104,1) (FunLhs (Ident "getFileInPath" 0) [(VariablePattern (Ident "file" 50)),(VariablePattern (Ident "suffixes" 50)),(VariablePattern (Ident "path" 50))]) (SimpleRhs (104,36) (Do [(StmtBind (VariablePattern (Ident "mbfile" 52)) (Apply (Apply (Apply (Variable (QualIdent (Just "FileGoodies") (Ident "lookupFileInPath" 0))) (Variable (QualIdent Nothing (Ident "file" 50)))) (Variable (QualIdent Nothing (Ident "suffixes" 50)))) (Variable (QualIdent Nothing (Ident "path" 50)))))] (Apply (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "maybe" 0))) (Paren (InfixApply (Variable (QualIdent (Just "Prelude") (Ident "error" 0))) (InfixOp (QualIdent (Just "Prelude") (Ident "$" 0))) (InfixApply (Literal (String "File ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "file" 50))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String " not found in path ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Apply (Variable (QualIdent (Just "Prelude") (Ident "concat" 0))) (Paren (Apply (Apply (Variable (QualIdent (Just "List") (Ident "intersperse" 0))) (List [(Variable (QualIdent (Just "FileGoodies") (Ident "pathSeparatorChar" 0)))])) (Variable (QualIdent Nothing (Ident "path" 50)))))))))))) (Variable (QualIdent (Just "Prelude") (Ident "return" 0)))) (Variable (QualIdent Nothing (Ident "mbfile" 52))))) []))]) ,(TypeSig (112,1) [(Ident "replaceFileName" 0)] (ArrowType (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ConstructorType (QualIdent Nothing (Ident "String" 0)) [])) (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ConstructorType (QualIdent Nothing (Ident "String" 0)) [])))) ,(FunctionDecl (113,1) (Ident "replaceFileName" 0) [(Equation (113,1) (FunLhs (Ident "replaceFileName" 0) [(VariablePattern (Ident "f" 53)),(VariablePattern (Ident "s" 53))]) (SimpleRhs (113,23) (Let [(PatternDecl (113,27) (TuplePattern [(VariablePattern (Ident "dir" 55)),(VariablePattern (Ident "fn" 55))]) (SimpleRhs (113,38) (Apply (Variable (QualIdent (Just "FileGoodies") (Ident "splitDirectoryBaseName" 0))) (Variable (QualIdent Nothing (Ident "s" 53)))) []))] (Case (Variable (QualIdent Nothing (Ident "dir" 55))) [(Alt (115,23) (LiteralPattern (String ".")) (SimpleRhs (115,30) (Apply (Variable (QualIdent Nothing (Ident "f" 53))) (Variable (QualIdent Nothing (Ident "fn" 55)))) [])),(Alt (116,23) (VariablePattern (Ident "_" 60)) (SimpleRhs (116,30) (InfixApply (Variable (QualIdent Nothing (Ident "dir" 55))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent (Just "FileGoodies") (Ident "separatorChar" 0))) (InfixConstr (QualIdent Nothing (Ident ":" 0))) (Apply (Variable (QualIdent Nothing (Ident "f" 53))) (Variable (QualIdent Nothing (Ident "fn" 55)))))) []))])) []))]) ]