Skip to content

[#692] Fix toExpression in combs with var anns

Description

Problem: We try to convert right combs to lists in toExpression, however this transformation is not always lossless. Particularly, if a pair in the comb has annotations, it can't be represented in the list. We check for field and type annotations, but not var annotations.

Solution: Check for var annotations, too.

Also clean up the code a little bit while at it.

Related issue(s)

Resolves #692 (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 changelog files of all affected packages released to Hackage if my changes are externally visible.

Stylistic guide (mandatory)

Merge request reports