[#37] generalize failing instructions in Indigo
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
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.