Skip to content

[#37] generalize failing instructions in Indigo

Pinto Pasquale requested to merge pasqu4le/#37-indigo-generic-fail into master

Description

Failing instructions in Indigo are currently implemented with a fixed output value of () and also having the output stack be the same as the input one.

With this MR failWith is now part the erroring instructions in Indigo and the existing ones have been modified to have arbitrary output value and stack.

To be able to do this, they use a generic error for both, which in turn required the output value to be lazy. For this reason GenCode has been modified to also contain it and replace the tuple that previously was the result of an IndigoM computation.

Related issue(s)

Resolves #37 (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

    • I checked whether I should update the docs and did so if necessary:
    • I updated the changelog if my changes are externally visible.

Stylistic guide (mandatory)

Merge request reports