Module "Assertion" (Just (Exporting (9,17) [(ExportTypeAll (QualIdent Nothing (Ident "Assertion" 0))),(Export (QualIdent Nothing (Ident "checkAssertion" 0))),(Export (QualIdent Nothing (Ident "seqStrActions" 0))),(Export (QualIdent Nothing (Ident "writeAssertResult" 0))),(ExportTypeAll (QualIdent Nothing (Ident "ProtocolMsg" 0))),(Export (QualIdent Nothing (Ident "showTestMod" 0))),(Export (QualIdent Nothing (Ident "showTestCase" 0))),(Export (QualIdent Nothing (Ident "showTestEnd" 0))),(Export (QualIdent Nothing (Ident "showTestCompileError" 0)))])) [(ImportDecl (1,1) "Prelude" False Nothing Nothing) ,(ImportDecl (16,1) "List" False Nothing (Just (Importing (16,12) [(Import (Ident "\\\\" 0))]))) ,(ImportDecl (17,1) "IO" False Nothing Nothing) ,(DataDecl (35,1) (Ident "Assertion" 0) [(Ident "a" 0)] [(ConstrDecl (35,20) [] (Ident "AssertTrue" 0) [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "Bool" 0)) [])]),(ConstrDecl (36,20) [] (Ident "AssertEqual" 0) [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(VariableType (Ident "a" 0)),(VariableType (Ident "a" 0))]),(ConstrDecl (37,20) [] (Ident "AssertValues" 0) [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(VariableType (Ident "a" 0)),(ListType (VariableType (Ident "a" 0)))]),(ConstrDecl (38,20) [] (Ident "AssertSolutions" 0) [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ArrowType (VariableType (Ident "a" 0)) (ConstructorType (QualIdent Nothing (Ident "Success" 0)) [])),(ListType (VariableType (Ident "a" 0)))]),(ConstrDecl (39,20) [] (Ident "AssertIO" 0) [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(VariableType (Ident "a" 0))]),(VariableType (Ident "a" 0))]),(ConstrDecl (40,20) [] (Ident "AssertEqualIO" 0) [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(VariableType (Ident "a" 0))]),(ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(VariableType (Ident "a" 0))])])]) ,(DataDecl (159,1) (Ident "ProtocolMsg" 0) [] [(ConstrDecl (159,20) [] (Ident "TestModule" 0) [(ConstructorType (QualIdent Nothing (Ident "String" 0)) [])]),(ConstrDecl (159,40) [] (Ident "TestCase" 0) [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "Bool" 0)) [])]),(ConstrDecl (159,63) [] (Ident "TestFinished" 0) []),(ConstrDecl (160,20) [] (Ident "TestCompileError" 0) [])]) ,(InfixDecl (19,1) InfixL 1 [(Ident "seqStrActions" 0)]) ,(TypeSig (45,1) [(Ident "seqStrActions" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "Bool" 0)) [])])]) (ArrowType (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "Bool" 0)) [])])]) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "Bool" 0)) [])])])))) ,(FunctionDecl (46,1) (Ident "seqStrActions" 0) [(Equation (46,1) (FunLhs (Ident "seqStrActions" 0) [(VariablePattern (Ident "a1" 2)),(VariablePattern (Ident "a2" 2))]) (SimpleRhs (47,3) (Do [(StmtBind (TuplePattern [(VariablePattern (Ident "s1" 4)),(VariablePattern (Ident "b1" 4))]) (Variable (QualIdent Nothing (Ident "a1" 2)))),(StmtBind (TuplePattern [(VariablePattern (Ident "s2" 5)),(VariablePattern (Ident "b2" 5))]) (Variable (QualIdent Nothing (Ident "a2" 2))))] (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(InfixApply (Variable (QualIdent Nothing (Ident "s1" 4))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Variable (QualIdent Nothing (Ident "s2" 5)))),(InfixApply (Variable (QualIdent Nothing (Ident "b1" 4))) (InfixOp (QualIdent (Just "Prelude") (Ident "&&" 0))) (Variable (QualIdent Nothing (Ident "b2" 5))))]))) []))]) ,(TypeSig (57,1) [(Ident "checkAssertion" 0)] (ArrowType (ArrowType (TupleType [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "Bool" 0)) [])]) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "Bool" 0)) [])])])) (ArrowType (ConstructorType (QualIdent Nothing (Ident "Assertion" 0)) [(VariableType (Ident "_" 0))]) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "Bool" 0)) [])])])))) ,(FunctionDecl (59,1) (Ident "checkAssertion" 0) [(Equation (59,1) (FunLhs (Ident "checkAssertion" 0) [(VariablePattern (Ident "prot" 6)),(ParenPattern (ConstructorPattern (QualIdent (Just "Assertion") (Ident "AssertTrue" 0)) [(VariablePattern (Ident "name" 6)),(VariablePattern (Ident "cond" 6))]))]) (SimpleRhs (60,3) (InfixApply (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "catchFail" 0))) (Paren (Apply (Apply (Variable (QualIdent (Just "Assertion") (Ident "checkAssertTrue" 0))) (Variable (QualIdent Nothing (Ident "name" 6)))) (Variable (QualIdent Nothing (Ident "cond" 6)))))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(InfixApply (Literal (String "FAILURE of ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "name" 6))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String ": no solution or error\n")))),(Constructor (QualIdent (Just "Prelude") (Ident "False" 0)))])))) (InfixOp (QualIdent (Just "Prelude") (Ident ">>=" 0))) (Variable (QualIdent Nothing (Ident "prot" 6)))) [])),(Equation (63,1) (FunLhs (Ident "checkAssertion" 0) [(VariablePattern (Ident "prot" 8)),(ParenPattern (ConstructorPattern (QualIdent (Just "Assertion") (Ident "AssertEqual" 0)) [(VariablePattern (Ident "name" 8)),(VariablePattern (Ident "call" 8)),(VariablePattern (Ident "result" 8))]))]) (SimpleRhs (64,3) (InfixApply (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "catchFail" 0))) (Paren (Apply (Apply (Apply (Variable (QualIdent (Just "Assertion") (Ident "checkAssertEqual" 0))) (Variable (QualIdent Nothing (Ident "name" 8)))) (Variable (QualIdent Nothing (Ident "call" 8)))) (Variable (QualIdent Nothing (Ident "result" 8)))))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(InfixApply (Literal (String "FAILURE of ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "name" 8))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String ": no solution or error\n")))),(Constructor (QualIdent (Just "Prelude") (Ident "False" 0)))])))) (InfixOp (QualIdent (Just "Prelude") (Ident ">>=" 0))) (Variable (QualIdent Nothing (Ident "prot" 8)))) [])),(Equation (67,1) (FunLhs (Ident "checkAssertion" 0) [(VariablePattern (Ident "prot" 10)),(ParenPattern (ConstructorPattern (QualIdent (Just "Assertion") (Ident "AssertValues" 0)) [(VariablePattern (Ident "name" 10)),(VariablePattern (Ident "expr" 10)),(VariablePattern (Ident "results" 10))]))]) (SimpleRhs (68,3) (InfixApply (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "catchFail" 0))) (Paren (Apply (Apply (Apply (Variable (QualIdent (Just "Assertion") (Ident "checkAssertValues" 0))) (Variable (QualIdent Nothing (Ident "name" 10)))) (Variable (QualIdent Nothing (Ident "expr" 10)))) (Variable (QualIdent Nothing (Ident "results" 10)))))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(InfixApply (Literal (String "FAILURE of ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "name" 10))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String ": no solution or error\n")))),(Constructor (QualIdent (Just "Prelude") (Ident "False" 0)))])))) (InfixOp (QualIdent (Just "Prelude") (Ident ">>=" 0))) (Variable (QualIdent Nothing (Ident "prot" 10)))) [])),(Equation (71,1) (FunLhs (Ident "checkAssertion" 0) [(VariablePattern (Ident "prot" 12)),(ParenPattern (ConstructorPattern (QualIdent (Just "Assertion") (Ident "AssertSolutions" 0)) [(VariablePattern (Ident "name" 12)),(VariablePattern (Ident "constr" 12)),(VariablePattern (Ident "results" 12))]))]) (SimpleRhs (72,3) (InfixApply (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "catchFail" 0))) (Paren (Apply (Apply (Apply (Variable (QualIdent (Just "Assertion") (Ident "checkAssertSolutions" 0))) (Variable (QualIdent Nothing (Ident "name" 12)))) (Variable (QualIdent Nothing (Ident "constr" 12)))) (Variable (QualIdent Nothing (Ident "results" 12)))))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(InfixApply (Literal (String "FAILURE of ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "name" 12))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String ": no solution or error\n")))),(Constructor (QualIdent (Just "Prelude") (Ident "False" 0)))])))) (InfixOp (QualIdent (Just "Prelude") (Ident ">>=" 0))) (Variable (QualIdent Nothing (Ident "prot" 12)))) [])),(Equation (75,1) (FunLhs (Ident "checkAssertion" 0) [(VariablePattern (Ident "prot" 14)),(ParenPattern (ConstructorPattern (QualIdent (Just "Assertion") (Ident "AssertIO" 0)) [(VariablePattern (Ident "name" 14)),(VariablePattern (Ident "action" 14)),(VariablePattern (Ident "result" 14))]))]) (SimpleRhs (76,3) (InfixApply (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "catchFail" 0))) (Paren (Apply (Apply (Apply (Variable (QualIdent (Just "Assertion") (Ident "checkAssertIO" 0))) (Variable (QualIdent Nothing (Ident "name" 14)))) (Variable (QualIdent Nothing (Ident "action" 14)))) (Variable (QualIdent Nothing (Ident "result" 14)))))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(InfixApply (Literal (String "FAILURE of ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "name" 14))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String ": no solution or error\n")))),(Constructor (QualIdent (Just "Prelude") (Ident "False" 0)))])))) (InfixOp (QualIdent (Just "Prelude") (Ident ">>=" 0))) (Variable (QualIdent Nothing (Ident "prot" 14)))) [])),(Equation (79,1) (FunLhs (Ident "checkAssertion" 0) [(VariablePattern (Ident "prot" 16)),(ParenPattern (ConstructorPattern (QualIdent (Just "Assertion") (Ident "AssertEqualIO" 0)) [(VariablePattern (Ident "name" 16)),(VariablePattern (Ident "action1" 16)),(VariablePattern (Ident "action2" 16))]))]) (SimpleRhs (80,3) (InfixApply (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "catchFail" 0))) (Paren (Apply (Apply (Apply (Variable (QualIdent (Just "Assertion") (Ident "checkAssertEqualIO" 0))) (Variable (QualIdent Nothing (Ident "name" 16)))) (Variable (QualIdent Nothing (Ident "action1" 16)))) (Variable (QualIdent Nothing (Ident "action2" 16)))))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(InfixApply (Literal (String "FAILURE of ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "name" 16))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String ": no solution or error\n")))),(Constructor (QualIdent (Just "Prelude") (Ident "False" 0)))])))) (InfixOp (QualIdent (Just "Prelude") (Ident ">>=" 0))) (Variable (QualIdent Nothing (Ident "prot" 16)))) []))]) ,(TypeSig (85,1) [(Ident "checkAssertTrue" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ArrowType (ConstructorType (QualIdent Nothing (Ident "Bool" 0)) []) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "Bool" 0)) [])])])))) ,(FunctionDecl (86,1) (Ident "checkAssertTrue" 0) [(Equation (86,1) (FunLhs (Ident "checkAssertTrue" 0) [(VariablePattern (Ident "name" 18)),(VariablePattern (Ident "cond" 18))]) (SimpleRhs (87,3) (IfThenElse (Variable (QualIdent Nothing (Ident "cond" 18))) (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(InfixApply (Literal (String "OK: ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "name" 18))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String "\n")))),(Constructor (QualIdent (Just "Prelude") (Ident "True" 0)))])) (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(InfixApply (Literal (String "FAILURE of ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "name" 18))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String ": assertion not satisfied\n")))),(Constructor (QualIdent (Just "Prelude") (Ident "False" 0)))]))) []))]) ,(TypeSig (92,1) [(Ident "checkAssertEqual" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ArrowType (VariableType (Ident "a" 0)) (ArrowType (VariableType (Ident "a" 0)) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "Bool" 0)) [])])]))))) ,(FunctionDecl (93,1) (Ident "checkAssertEqual" 0) [(Equation (93,1) (FunLhs (Ident "checkAssertEqual" 0) [(VariablePattern (Ident "name" 20)),(VariablePattern (Ident "call" 20)),(VariablePattern (Ident "result" 20))]) (SimpleRhs (93,37) (Do [(StmtDecl [(PatternDecl (94,7) (VariablePattern (Ident "r" 22)) (SimpleRhs (94,11) (Variable (QualIdent Nothing (Ident "call" 20))) []))])] (IfThenElse (InfixApply (Variable (QualIdent Nothing (Ident "r" 22))) (InfixOp (QualIdent (Just "Prelude") (Ident "==" 0))) (Variable (QualIdent Nothing (Ident "result" 20)))) (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(InfixApply (Literal (String "OK: ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "name" 20))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String "\n")))),(Constructor (QualIdent (Just "Prelude") (Ident "True" 0)))])) (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(InfixApply (Literal (String "FAILURE of ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "name" 20))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String ": equality assertion not satisfied:\n")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String "Computed answer: ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "show" 0))) (Variable (QualIdent Nothing (Ident "r" 22)))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String "\n")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String "Expected answer: ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "show" 0))) (Variable (QualIdent Nothing (Ident "result" 20)))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String "\n")))))))))),(Constructor (QualIdent (Just "Prelude") (Ident "False" 0)))])))) []))]) ,(TypeSig (102,1) [(Ident "checkAssertValues" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ArrowType (VariableType (Ident "a" 0)) (ArrowType (ListType (VariableType (Ident "a" 0))) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "Bool" 0)) [])])]))))) ,(FunctionDecl (103,1) (Ident "checkAssertValues" 0) [(Equation (103,1) (FunLhs (Ident "checkAssertValues" 0) [(VariablePattern (Ident "name" 24)),(VariablePattern (Ident "call" 24)),(VariablePattern (Ident "results" 24))]) (SimpleRhs (103,39) (Do [(StmtBind (VariablePattern (Ident "st" 26)) (Apply (Variable (QualIdent (Just "Prelude") (Ident "getSearchTree" 0))) (Variable (QualIdent Nothing (Ident "call" 24))))),(StmtDecl [(PatternDecl (105,7) (VariablePattern (Ident "rs" 27)) (SimpleRhs (105,12) (Apply (Variable (QualIdent (Just "Prelude") (Ident "allValuesB" 0))) (Variable (QualIdent Nothing (Ident "st" 26)))) []))])] (IfThenElse (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "null" 0))) (Paren (InfixApply (Variable (QualIdent Nothing (Ident "rs" 27))) (InfixOp (QualIdent (Just "List") (Ident "\\\\" 0))) (Variable (QualIdent Nothing (Ident "results" 24)))))) (InfixOp (QualIdent (Just "Prelude") (Ident "&&" 0))) (Apply (Variable (QualIdent (Just "Prelude") (Ident "null" 0))) (Paren (InfixApply (Variable (QualIdent Nothing (Ident "results" 24))) (InfixOp (QualIdent (Just "List") (Ident "\\\\" 0))) (Variable (QualIdent Nothing (Ident "rs" 27))))))) (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(InfixApply (Literal (String "OK: ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "name" 24))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String "\n")))),(Constructor (QualIdent (Just "Prelude") (Ident "True" 0)))])) (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(InfixApply (Literal (String "FAILURE of ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "name" 24))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String ": values assertion not satisfied:\n")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String "Computed values: ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "show" 0))) (Variable (QualIdent Nothing (Ident "rs" 27)))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String "\n")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String "Expected values: ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "show" 0))) (Variable (QualIdent Nothing (Ident "results" 24)))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String "\n")))))))))),(Constructor (QualIdent (Just "Prelude") (Ident "False" 0)))])))) []))]) ,(TypeSig (113,1) [(Ident "checkAssertSolutions" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ArrowType (ArrowType (VariableType (Ident "a" 0)) (ConstructorType (QualIdent Nothing (Ident "Success" 0)) [])) (ArrowType (ListType (VariableType (Ident "a" 0))) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "Bool" 0)) [])])]))))) ,(FunctionDecl (114,1) (Ident "checkAssertSolutions" 0) [(Equation (114,1) (FunLhs (Ident "checkAssertSolutions" 0) [(VariablePattern (Ident "name" 29)),(VariablePattern (Ident "constr" 29)),(VariablePattern (Ident "results" 29))]) (SimpleRhs (114,44) (Do [(StmtBind (VariablePattern (Ident "st" 32)) (Apply (Variable (QualIdent (Just "Prelude") (Ident "getSearchTree" 0))) (Paren (Let [(ExtraVariables (115,28) [(Ident "x" 31)])] (Tuple [(Variable (QualIdent Nothing (Ident "x" 31))),(Apply (Variable (QualIdent Nothing (Ident "constr" 29))) (Variable (QualIdent Nothing (Ident "x" 31))))]))))),(StmtDecl [(PatternDecl (116,7) (VariablePattern (Ident "rs" 33)) (SimpleRhs (116,12) (Apply (Apply (Variable (QualIdent (Just "Prelude") (Ident "map" 0))) (Variable (QualIdent (Just "Prelude") (Ident "fst" 0)))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "allValuesB" 0))) (Variable (QualIdent Nothing (Ident "st" 32)))))) []))])] (IfThenElse (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "null" 0))) (Paren (InfixApply (Variable (QualIdent Nothing (Ident "rs" 33))) (InfixOp (QualIdent (Just "List") (Ident "\\\\" 0))) (Variable (QualIdent Nothing (Ident "results" 29)))))) (InfixOp (QualIdent (Just "Prelude") (Ident "&&" 0))) (Apply (Variable (QualIdent (Just "Prelude") (Ident "null" 0))) (Paren (InfixApply (Variable (QualIdent Nothing (Ident "results" 29))) (InfixOp (QualIdent (Just "List") (Ident "\\\\" 0))) (Variable (QualIdent Nothing (Ident "rs" 33))))))) (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(InfixApply (Literal (String "OK: ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "name" 29))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String "\n")))),(Constructor (QualIdent (Just "Prelude") (Ident "True" 0)))])) (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(InfixApply (Literal (String "FAILURE of ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "name" 29))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String ": solutions assertion not satisfied:\n")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String "Computed values: ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "show" 0))) (Variable (QualIdent Nothing (Ident "rs" 33)))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String "\n")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String "Expected values: ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "show" 0))) (Variable (QualIdent Nothing (Ident "results" 29)))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String "\n")))))))))),(Constructor (QualIdent (Just "Prelude") (Ident "False" 0)))])))) []))]) ,(TypeSig (124,1) [(Ident "checkAssertIO" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ArrowType (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(VariableType (Ident "a" 0))]) (ArrowType (VariableType (Ident "a" 0)) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "Bool" 0)) [])])]))))) ,(FunctionDecl (125,1) (Ident "checkAssertIO" 0) [(Equation (125,1) (FunLhs (Ident "checkAssertIO" 0) [(VariablePattern (Ident "name" 35)),(VariablePattern (Ident "action" 35)),(VariablePattern (Ident "result" 35))]) (SimpleRhs (125,36) (Do [(StmtBind (VariablePattern (Ident "r" 37)) (Variable (QualIdent Nothing (Ident "action" 35))))] (IfThenElse (InfixApply (Variable (QualIdent Nothing (Ident "r" 37))) (InfixOp (QualIdent (Just "Prelude") (Ident "==" 0))) (Variable (QualIdent Nothing (Ident "result" 35)))) (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(InfixApply (Literal (String "OK: ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "name" 35))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String "\n")))),(Constructor (QualIdent (Just "Prelude") (Ident "True" 0)))])) (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(InfixApply (Literal (String "FAILURE of ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "name" 35))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String ": IO assertion not satisfied:\n")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String "Computed answer: ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "show" 0))) (Variable (QualIdent Nothing (Ident "r" 37)))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String "\n")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String "Expected answer: ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "show" 0))) (Variable (QualIdent Nothing (Ident "result" 35)))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String "\n\n")))))))))),(Constructor (QualIdent (Just "Prelude") (Ident "False" 0)))])))) []))]) ,(TypeSig (134,1) [(Ident "checkAssertEqualIO" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ArrowType (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(VariableType (Ident "a" 0))]) (ArrowType (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(VariableType (Ident "a" 0))]) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "Bool" 0)) [])])]))))) ,(FunctionDecl (135,1) (Ident "checkAssertEqualIO" 0) [(Equation (135,1) (FunLhs (Ident "checkAssertEqualIO" 0) [(VariablePattern (Ident "name" 38)),(VariablePattern (Ident "action1" 38)),(VariablePattern (Ident "action2" 38))]) (SimpleRhs (135,43) (Do [(StmtBind (VariablePattern (Ident "r1" 40)) (Variable (QualIdent Nothing (Ident "action1" 38)))),(StmtBind (VariablePattern (Ident "r2" 41)) (Variable (QualIdent Nothing (Ident "action2" 38))))] (IfThenElse (InfixApply (Variable (QualIdent Nothing (Ident "r1" 40))) (InfixOp (QualIdent (Just "Prelude") (Ident "==" 0))) (Variable (QualIdent Nothing (Ident "r2" 41)))) (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(InfixApply (Literal (String "OK: ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "name" 38))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String "\n")))),(Constructor (QualIdent (Just "Prelude") (Ident "True" 0)))])) (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(InfixApply (Literal (String "FAILURE of ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Variable (QualIdent Nothing (Ident "name" 38))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String ": IO equality assertion not satisfied:\n")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String "Computed answer 1: ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "show" 0))) (Variable (QualIdent Nothing (Ident "r1" 40)))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String "\n")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Literal (String "Computed answer 2: ")) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (InfixApply (Apply (Variable (QualIdent (Just "Prelude") (Ident "show" 0))) (Variable (QualIdent Nothing (Ident "r2" 41)))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String "\n\n")))))))))),(Constructor (QualIdent (Just "Prelude") (Ident "False" 0)))])))) []))]) ,(TypeSig (147,1) [(Ident "writeAssertResult" 0)] (ArrowType (TupleType [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "Bool" 0)) [])]) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [])]))) ,(FunctionDecl (148,1) (Ident "writeAssertResult" 0) [(Equation (148,1) (FunLhs (Ident "writeAssertResult" 0) [(TuplePattern [(VariablePattern (Ident "result" 42)),(VariablePattern (Ident "flag" 42))])]) (SimpleRhs (149,3) (IfThenElse (Variable (QualIdent Nothing (Ident "flag" 42))) (Apply (Variable (QualIdent (Just "Prelude") (Ident "putStrLn" 0))) (Paren (InfixApply (Variable (QualIdent Nothing (Ident "result" 42))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String "All tests successfully passed."))))) (Apply (Variable (QualIdent (Just "Prelude") (Ident "putStrLn" 0))) (Paren (InfixApply (Variable (QualIdent Nothing (Ident "result" 42))) (InfixOp (QualIdent (Just "Prelude") (Ident "++" 0))) (Literal (String "FAILURE occurred in some assertions!\n")))))) []))]) ,(TypeSig (162,1) [(Ident "doSend" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "Handle" 0)) []) (ArrowType (VariableType (Ident "a" 0)) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [])])))) ,(FunctionDecl (163,1) (Ident "doSend" 0) [(Equation (163,1) (FunLhs (Ident "doSend" 0) [(VariablePattern (Ident "h" 44)),(VariablePattern (Ident "x" 44))]) (SimpleRhs (163,14) (Apply (Apply (Variable (QualIdent (Just "IO") (Ident "hPutStrLn" 0))) (Variable (QualIdent Nothing (Ident "h" 44)))) (Paren (Apply (Variable (QualIdent (Just "Prelude") (Ident "show" 0))) (Variable (QualIdent Nothing (Ident "x" 44)))))) []))]) ,(TypeSig (167,1) [(Ident "showTestMod" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "Handle" 0)) []) (ArrowType (ConstructorType (QualIdent Nothing (Ident "String" 0)) []) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [])])))) ,(FunctionDecl (168,1) (Ident "showTestMod" 0) [(Equation (168,1) (FunLhs (Ident "showTestMod" 0) [(VariablePattern (Ident "port" 46)),(VariablePattern (Ident "modname" 46))]) (SimpleRhs (168,28) (Apply (Apply (Variable (QualIdent (Just "Assertion") (Ident "doSend" 0))) (Variable (QualIdent Nothing (Ident "port" 46)))) (Paren (Apply (Constructor (QualIdent (Just "Assertion") (Ident "TestModule" 0))) (Variable (QualIdent Nothing (Ident "modname" 46)))))) []))]) ,(TypeSig (173,1) [(Ident "showTestCase" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "Handle" 0)) []) (ArrowType (TupleType [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "Bool" 0)) [])]) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [(ConstructorType (QualIdent Nothing (Ident "String" 0)) []),(ConstructorType (QualIdent Nothing (Ident "Bool" 0)) [])])])))) ,(FunctionDecl (174,1) (Ident "showTestCase" 0) [(Equation (174,1) (FunLhs (Ident "showTestCase" 0) [(VariablePattern (Ident "port" 48)),(TuplePattern [(VariablePattern (Ident "s" 48)),(VariablePattern (Ident "b" 48))])]) (SimpleRhs (175,3) (InfixApply (Apply (Apply (Variable (QualIdent (Just "Assertion") (Ident "doSend" 0))) (Variable (QualIdent Nothing (Ident "port" 48)))) (Paren (Apply (Apply (Constructor (QualIdent (Just "Assertion") (Ident "TestCase" 0))) (Variable (QualIdent Nothing (Ident "s" 48)))) (Variable (QualIdent Nothing (Ident "b" 48)))))) (InfixOp (QualIdent (Just "Prelude") (Ident ">>" 0))) (Apply (Variable (QualIdent (Just "Prelude") (Ident "return" 0))) (Tuple [(Variable (QualIdent Nothing (Ident "s" 48))),(Variable (QualIdent Nothing (Ident "b" 48)))]))) []))]) ,(TypeSig (180,1) [(Ident "showTestEnd" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "Handle" 0)) []) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [])]))) ,(FunctionDecl (181,1) (Ident "showTestEnd" 0) [(Equation (181,1) (FunLhs (Ident "showTestEnd" 0) [(VariablePattern (Ident "port" 50))]) (SimpleRhs (181,20) (Apply (Apply (Variable (QualIdent (Just "Assertion") (Ident "doSend" 0))) (Variable (QualIdent Nothing (Ident "port" 50)))) (Constructor (QualIdent (Just "Assertion") (Ident "TestFinished" 0)))) []))]) ,(TypeSig (185,1) [(Ident "showTestCompileError" 0)] (ArrowType (ConstructorType (QualIdent Nothing (Ident "Handle" 0)) []) (ConstructorType (QualIdent Nothing (Ident "IO" 0)) [(TupleType [])]))) ,(FunctionDecl (186,1) (Ident "showTestCompileError" 0) [(Equation (186,1) (FunLhs (Ident "showTestCompileError" 0) [(VariablePattern (Ident "port" 52))]) (SimpleRhs (186,29) (Apply (Apply (Variable (QualIdent (Just "Assertion") (Ident "doSend" 0))) (Variable (QualIdent Nothing (Ident "port" 52)))) (Constructor (QualIdent (Just "Assertion") (Ident "TestCompileError" 0)))) []))]) ]