Skip to content

[#723] Add synonyms for SomeConstrainedValue

This is more of an RFC.

There is some simplification, specifically, we don't have to define instances for each new existential (at least if we're willing to use quantified constraints), and adding synonyms is nearly trivial.

That said, not like this affects the code base in any meaningful way, unless we choose to remove synonyms and use SomeConstrainedValue everywhere, which IMO is less readable overall.

Description

Problem: We're defining SomeValue, SomeStorage and SomeConstant as separate existential wrappers, while we have SomeConstrainedValue already.

Solution: Define SomeValue, SomeStorage and SomeConstant in terms of SomeConstrainedValue. Define instances on SomeConstrainedValue directly.

Related issue(s)

Resolves #723 (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)

Edited by Nikolay Yakimov

Merge request reports