Closed cunhapassos closed 8 years ago
Escrevi o seguinte teste para começar a analisar o código:
-- | legal assignment
legalAssignment :: Statement
-- x1 já foi definido anteriormente em Testes.hs
legalAssignment = x1
outputAssignment = Assignment "output" (ExpValue (NATValue 1))
-- | Program with one assignment
programWithAssignment :: Statement -> Program
programWithAssignment stmt = Program st [stmt, outputAssignment]
legalAssignmentProgram = programWithAssignment legalAssignment
typeChecking1 = TestCase (assertBool "Valid assignment should return true"
(typeCheck legalAssignmentProgram))
Output: Pico\TypeChecker.hs:(9,1)-(32,86): Non-exhaustive patterns in function checkStatement
Incomplete type checker. Some functions still require adjustments.