[#325] Remove useless error entities from `Michelson.Interpret`
Description
There are two ways to report typechecker error in the ExecutorError
datatype from Michelson.Runtime
:
- Use
EEIllTyped*
constructors ofExecutorError
- Use
IllTyped*
constructors ofInterpretError
fromMichelson.Interpret
It can lead to difficulties in pattern-matching over errors, because double error handlings is basically needed for this.
However, we use these IllTyped*
constructors only in interpretUntyped
function, which is not used anywhere in the project.
The solution is to get rid of interpretUntyped
and IllTyped*
as a result. This doesn't influence other modules.
Related issue(s)
Resolves #325 (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.
Merge request reports
Activity
131 128 OpPresent -> "<value with operations>" 132 129 OpAbsent -> build (untypeValue v) 133 130 134 data InterpretError 135 = RuntimeFailure (MichelsonFailed, MorleyLogs) 136 | IllTypedContract TCError 137 | IllTypedParam TCError 138 | IllTypedStorage TCError 131 newtype InterpretError = RuntimeFailure (MichelsonFailed, MorleyLogs) - Since it's just a newtype now, I would rename the constructor to match the type name (i. e. to
InterpretError
). - I am not sure whether we need this type at all. I see it's part of
EEInterpreterFailed
, but in places where we pattern-match on it we ignoreMorleyLogs
. AFAIU the only place whereMorleyLogs
(that's part of this type) is used isBuildable
andShow
instances. There is #257 (closed) about printingMorleyLogs
. Let's keep thisInterpretError
type for now, but I am going to assign #257 (closed) to you (you can do it before or afterxrefcheck
tasks), please check whether this type will still be useful after #257 (closed) (and remove it there if it becomes useless).
- Since it's just a newtype now, I would rename the constructor to match the type name (i. e. to
changed this line in version 2 of the diff
Fixed!
I suppose it's good to start #257 (closed) first.
Is second approve from another person needed for this issue?
Edited by Alyona Antonova
added 1 commit
- e76053fe - fixup! [#325 (closed)] Remove useless error entities from `Michelson.Interpret`
marked as a Work In Progress from e76053fe
added 1 commit
- 04495c5b - [#325 (closed)] Remove useless error entities from `Michelson.Interpret`
added 3 commits
- c24b2543 - [#325 (closed)] Remove useless error entities from `Michelson.Interpret`
- e76053fe - fixup! [#325 (closed)] Remove useless error entities from `Michelson.Interpret`
- 765ced42 - fixup! [#325 (closed)] Remove useless error entities from `Michelson.Interpret`
added 1 commit
- 926493d4 - fixup! # This is a combination of 2 commits. # This is the 1st commit message:
added 1 commit
- b16252ba - [#325 (closed)] Remove useless error entities from `Michelson.Interpret`
added 33 commits
-
b16252ba...ae8d0801 - 32 commits from branch
master
- babcedbf - [#325 (closed)] Remove useless error entities from `Michelson.Interpret`
-
b16252ba...ae8d0801 - 32 commits from branch
mentioned in commit b00c8246
mentioned in merge request !571 (merged)