[#154] Handle all unmatched cases in typeCheckInstr
Description
Problem: Currently typeCheckInstr
in Michelson.TypeCheck.Instr
contains a lot of pattern match clauses that match all valid instructions, and then one catch-all case that just reports generic error about failed instructions.
This should be replaced with pattern match on all possible instructions, to give more fine-grained error messages. For example, UPDATE
should report what type it expects and what were given.
Solution: Handle all unmatched cases in typeCheckInstr
and make it reports understandable and specific errors for all syntactically possible, but incorrect instructions.
Related issue(s)
Resolves #154 (closed)
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Moremi Vannak