Module "PropertyFile" (Just (Exporting (12,20) [(Export (QualIdent Nothing (Ident "readPropertyFile" 0))),(Export (QualIdent Nothing (Ident "updatePropertyFile" 0)))])) [(ImportDecl (1,1) "Prelude" False Nothing Nothing) ,(ImportDecl (14,1) "Directory" False Nothing Nothing) ,(ImportDecl (15,1) "IOExts" False Nothing Nothing) ,(ImportDecl (16,1) "Char" False Nothing Nothing) ,(TypeSig (20,1) [(Ident "readPropertyFile" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(ListType (TupleType [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "String" 0)) [])]))]))) ,(FunctionDecl (21,1) (Ident "readPropertyFile" 0) [(Equation (21,1) (FunLhs (Ident "readPropertyFile" 0) [(VariablePattern (Ident "file" 2))]) (SimpleRhs (21,25) (Do [(StmtBind (VariablePattern (Ident "pfexists" 14)) (Apply (Variable (QualIdent (Just "Directory") (Ident "doesFileExist" 0))) (Variable (QualIdent Nothing (Ident "file" 2)))))] (IfThenElse (Variable (QualIdent Nothing (Ident "pfexists" 14))) (Do [(StmtBind (VariablePattern (Ident "rcs" 15)) (Apply (Variable (QualIdent (Just "Prelude") (Ident "readFile" 0))) (Variable (QualIdent Nothing (Ident "file" 2)))))] (InfixApply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (InfixOp (QualIdent (Just "Prelude") (Ident "$" 0))) (InfixApply (InfixApply (Variable (QualIdent Nothing (Ident "splitEqs" 3))) (InfixOp (QualIdent (Just "Prelude") (Ident "." 0))) (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "filter" 0))) (Paren (Lambda [(VariablePattern (Ident "l" 16))] (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "not" 0))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "null" 0))) (Variable (QualIdent Nothing (Ident "l" 16)))))) (InfixOp (QualIdent (Just "Prelude") (Ident "&&" 0))) (Apply (Variable (QualIdent (Just "Char") (Ident "isAlpha" 0))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "head" 0))) (Variable (QualIdent Nothing (Ident "l" 16)))))))))) (InfixOp (QualIdent (Just "Prelude") (Ident "." 0))) (Variable (QualIdent (Just "Prelude") (Ident "lines" 0))))) (InfixOp (QualIdent (Just "Prelude") (Ident "$" 0))) (Variable (QualIdent Nothing (Ident "rcs" 15)))))) (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (List [])))) [(FunctionDecl (29,3) (Ident "splitEqs" 3) [(Equation (29,3) (FunLhs (Ident "splitEqs" 3) [(ListPattern [])]) (SimpleRhs (29,17) (List []) [])),(Equation (30,3) (FunLhs (Ident "splitEqs" 3) [(ParenPattern (InfixPattern (VariablePattern (Ident "eq" 6)) (QualIdent Nothing (Ident ":" 0)) (VariablePattern (Ident "eqs" 6))))]) (SimpleRhs (30,23) (Case (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "break" 0))) (RightSection (InfixOp (QualIdent (Just "Prelude") (Ident "==" 0))) (Literal (Char '=')))) (Variable (QualIdent Nothing (Ident "eq" 6)))) [(Alt (31,6) (TuplePattern [(VariablePattern (Ident "prop" 8)),(InfixPattern (VariablePattern (Ident "_" 9)) (QualIdent Nothing (Ident ":" 0)) (VariablePattern (Ident "val" 8)))]) (SimpleRhs (31,22) (InfixApply (Tuple [(Variable (QualIdent Nothing (Ident "prop" 8))),(Variable (QualIdent Nothing (Ident "val" 8)))]) (InfixConstr (QualIdent Nothing (Ident ":" 0))) (Apply (Variable (QualIdent Nothing (Ident "splitEqs" 3))) (Variable (QualIdent Nothing (Ident "eqs" 6))))) [])),(Alt (32,6) (VariablePattern (Ident "_" 12)) (SimpleRhs (32,22) (Apply (Variable (QualIdent Nothing (Ident "splitEqs" 3))) (Variable (QualIdent Nothing (Ident "eqs" 6)))) []))]) []))])]))]) ,(TypeSig (40,1) [(Ident "updatePropertyFile" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [])]))))) ,(FunctionDecl (41,1) (Ident "updatePropertyFile" 0) [(Equation (41,1) (FunLhs (Ident "updatePropertyFile" 0) [(VariablePattern (Ident "file" 17)),(VariablePattern (Ident "pname" 17)),(VariablePattern (Ident "pval" 17))]) (SimpleRhs (41,38) (Do [(StmtBind (VariablePattern (Ident "props" 19)) (Apply (Variable (QualIdent (Just "PropertyFile") (Ident "readPropertyFile" 0))) (Variable (QualIdent Nothing (Ident "file" 17)))))] (IfThenElse (InfixApply (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "lookup" 0))) (Variable (QualIdent Nothing (Ident "pname" 17)))) (Variable (QualIdent Nothing (Ident "props" 19)))) (InfixOp (QualIdent (Just "Prelude") (Ident "==" 0))) (Constructor (QualIdent (Just "Prelude") (Ident "Nothing" 0)))) (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "appendFile" 0))) (Variable (QualIdent Nothing (Ident "file" 17)))) (Paren (InfixApply (Variable (QualIdent Nothing (Ident "pname" 17))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String "=")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "pval" 17))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String "\n"))))))) (Apply (Apply (Apply (Variable (QualIdent (Just "PropertyFile") (Ident "changePropertyInFile" 0))) (Variable (QualIdent Nothing (Ident "file" 17)))) (Variable (QualIdent Nothing (Ident "pname" 17)))) (Variable (QualIdent Nothing (Ident "pval" 17)))))) []))]) ,(TypeSig (48,1) [(Ident "changePropertyInFile" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [])]))))) ,(FunctionDecl (49,1) (Ident "changePropertyInFile" 0) [(Equation (49,1) (FunLhs (Ident "changePropertyInFile" 0) [(VariablePattern (Ident "file" 20)),(VariablePattern (Ident "pname" 20)),(VariablePattern (Ident "pval" 20))]) (SimpleRhs (49,40) (Do [] (Apply (Apply (Variable (QualIdent (Just "IOExts") (Ident "updateFile" 0))) (Paren (Lambda [(VariablePattern (Ident "rcs" 26))] (InfixApply (InfixApply (Variable (QualIdent (Just "Prelude") (Ident "unlines" 0))) (InfixOp (QualIdent (Just "Prelude") (Ident "." 0))) (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "map" 0))) (Variable (QualIdent Nothing (Ident "changeProp" 21)))) (InfixOp (QualIdent (Just "Prelude") (Ident "." 0))) (Variable (QualIdent (Just "Prelude") (Ident "lines" 0))))) (InfixOp (QualIdent (Just "Prelude") (Ident "$" 0))) (Variable (QualIdent Nothing (Ident "rcs" 26))))))) (Variable (QualIdent Nothing (Ident "file" 20))))) [(FunctionDecl (52,3) (Ident "changeProp" 21) [(Equation (52,3) (FunLhs (Ident "changeProp" 21) [(VariablePattern (Ident "l" 22))]) (SimpleRhs (52,18) (Let [(PatternDecl (52,22) (TuplePattern [(VariablePattern (Ident "s1" 24)),(VariablePattern (Ident "s2" 24))]) (SimpleRhs (52,32) (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "break" 0))) (RightSection (InfixOp (QualIdent (Just "Prelude") (Ident "==" 0))) (Literal (Char '=')))) (Variable (QualIdent Nothing (Ident "l" 22)))) []))] (IfThenElse (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "null" 0))) (Variable (QualIdent Nothing (Ident "l" 22)))) (InfixOp (QualIdent (Just "Prelude") (Ident "||" 0))) (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "not" 0))) (Paren (Apply (Variable (QualIdent (Just "Char") (Ident "isAlpha" 0))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "head" 0))) (Variable (QualIdent Nothing (Ident "l" 22)))))))) (InfixOp (QualIdent (Just "Prelude") (Ident "||" 0))) (Apply (Variable (QualIdent (Just "Prelude") (Ident "null" 0))) (Variable (QualIdent Nothing (Ident "s2" 24)))))) (Variable (QualIdent Nothing (Ident "l" 22))) (IfThenElse (InfixApply (Variable (QualIdent Nothing (Ident "s1" 24))) (InfixOp (QualIdent (Just "Prelude") (Ident "==" 0))) (Variable (QualIdent Nothing (Ident "pname" 20)))) (InfixApply (Variable (QualIdent Nothing (Ident "s1" 24))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String "=")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Variable (QualIdent Nothing (Ident "pval" 20))))) (Variable (QualIdent Nothing (Ident "l" 22)))))) []))])]))]) ]