Skip to content

[TM-336] use annotations in `PACK` and `UNPACK` instruction's logic

Pinto Pasquale requested to merge pasqu4le/tm336-packed-annotations into master

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

    • I checked whether I should update the docs and did so if necessary:

Stylistic guide (mandatory)

Edited by Pinto Pasquale

Merge request reports