Implement _Coerce :: TomlBiMap
#289
Labels
codec
Conversion between TOML and custom user data types
Milestone
_Coerce :: TomlBiMap
#289
I noticed that it's sometimes useful to be able to create
TomlBiMap
fornewtype
if you already have aTomlBiMap
for the type itself. For example:Currently, it's not straightforward to create custom
TomlBiMap
s fornewtype
s. So I think we can implement_Coerce
to help with this. And, as a proof of concept, we can implement_BatmanDouble
BiMap using_Coerce
tomland/test/Test/Toml/Codec/Combinator/Common.hs
Lines 37 to 40 in 4581781
and get rid of
testDouble
forBiMap
:tomland/test/Test/Toml/Codec/BiMap/Conversion.hs
Lines 71 to 78 in 4581781
The text was updated successfully, but these errors were encountered: