Skip to content

[TM-2] Wrap annotations with newtype

Ilya Peresadin requested to merge pva/tm2-annotations-newtype into master

Description

Problem: annotations are just Maybe Text and could be and each of them could be passed instead of other ones by mistake.

Solution: created Annotation newtype which accepts tag type parameter, which can be TypeTag, FieldTag, VarTag. Also in related types Note substring was replaced with Ann (stands for annotation).

Related issue(s)

https://issues.serokell.io/issue/TM-2

Checklist for your Merge Request

Related changes (conditional)

  • Tests

    • 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)

Merge request reports