[#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
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.