You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To have it work with metarpheus, we need to use instead a "flattened" representation as a product type. While the two are isomorphic, the tagged union representation is arguably safer because it encourages checking the mode before checking the selection, so it would be good to support it.
(Standard generic tagged union types like Option are already supported as special cases, as they were before #39.)
The text was updated successfully, but these errors were encountered:
The support for tagged unions introduced by #39 is limited to monomorphic tagged unions. It would be nice to support those with type parameters too.
As an example use case, in an internal project we have a polymorphic
Subset
type used to describe whitelists or blacklists:To have it work with metarpheus, we need to use instead a "flattened" representation as a product type. While the two are isomorphic, the tagged union representation is arguably safer because it encourages checking the mode before checking the selection, so it would be good to support it.
(Standard generic tagged union types like
Option
are already supported as special cases, as they were before #39.)The text was updated successfully, but these errors were encountered: