[#897] Add Constrained utility existential
NB: Some awkward instances could be simplified with GEq
and GCompare
, but that's left for #898 (closed).
Description
Problem: We use constrained existentials over GADTs in at least two places:
Morley.Tezos.Address.ConstrainedAddress
Morley.Michelson.Typed.Existential.SomeConstrainedValue
These two are very similar. Makes sense to unify them.
Solution: Introduce Constrained
existential, similar to Some
from
some
, but with additional constraints captured.
Related issue(s)
Resolves #897 (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.