[TM-336] use annotations in `PACK` and `UNPACK` instruction's logic
Description
The PACK
and UNPACK
instructions logic in the interpreter ignore annotations of instructions and types, that should instead be included in the encoded bytestring and in the decoded Haskell Types.
This MR adds the correct logic on both to encode type and field annotations as well as decoding them (with value annotations too).
NOTE: additionally, UNPACK
has been modified to hold a type annotation, because during tests of the solution it was found that it accepts one.
NOTE FOR REVIEWERS: to simplify review this MR is divided in a commit for PACK
, one for UNPACK
and one containing all tests.
Related issue(s)
https://issues.serokell.io/issue/TM-336
Resolves !
✅ 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 Pinto Pasquale