Skip to content
Snippets Groups Projects

[#325] Remove useless error entities from `Michelson.Interpret`

Merged [#325] Remove useless error entities from `Michelson.Interpret`
1 unresolved thread
Merged Alyona Antonova requested to merge alyoanton9/#325-remove-useless-error-entities into master
1 unresolved thread

Description

There are two ways to report typechecker error in the ExecutorError datatype from Michelson.Runtime:

  • Use EEIllTyped* constructors of ExecutorError
  • Use IllTyped* constructors of InterpretError from Michelson.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)

:white_check_mark: 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

    • I checked whether I should update the docs and did so if necessary:
    • I updated changelog files of all affected packages released to Hackage if my changes are externally visible.

Stylistic guide (mandatory)

Edited by Alyona Antonova

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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)
  • LGTM. I have one renaming suggestion and one comment about future work.

  • Ivan Gromakovskii approved this merge request

    approved this merge request

  • added 1 commit

    Compare with previous version

  • Alyona Antonova marked as a Work In Progress from e76053fe

    marked as a Work In Progress from e76053fe

  • added 1 commit

    Compare with previous version

  • Alyona Antonova added 3 commits

    added 3 commits

    Compare with previous version

  • added 1 commit

    • 8424902a - # This is a combination of 2 commits.

    Compare with previous version

  • added 1 commit

    • 926493d4 - fixup! # This is a combination of 2 commits. # This is the 1st commit message:

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Alyona Antonova unmarked as a Work In Progress

    unmarked as a Work In Progress

  • Roman Melnikov approved this merge request

    approved this merge request

  • Alyona Antonova approved this merge request

    approved this merge request

  • Alyona Antonova added 33 commits

    added 33 commits

    Compare with previous version

  • Alyona Antonova mentioned in commit b00c8246

    mentioned in commit b00c8246

  • Alyona Antonova mentioned in merge request !571 (merged)

    mentioned in merge request !571 (merged)

  • Please register or sign in to reply
    Loading