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
It may be useful to be able to alias tags, nullary or not. This'd be somewhat equivalent to Serde's alias attribute. An example use case:
typeWeather=Sum.Member<"Sun">|Sum.Member<"Rain">typeCountry="UK"// Rain|"Italy"// Sun|"Spain"// Sun
It's possible with getCodecFromMappedNullaryTag however that's not terribly ergonomic, and it's undocumented what should happen when multiple members of one type map to a single member of the other.
The text was updated successfully, but these errors were encountered:
samhh
changed the title
Aliased tagged sums
Aliased tagged sums / map multiple tags
Aug 11, 2023
It may be useful to be able to alias tags, nullary or not. This'd be somewhat equivalent to Serde's alias attribute. An example use case:
It's possible with getCodecFromMappedNullaryTag however that's not terribly ergonomic, and it's undocumented what should happen when multiple members of one type map to a single member of the other.
The text was updated successfully, but these errors were encountered: