Closed chshersh closed 4 years ago
Currently, I am getting
⢠Couldn't match type âTomlTable Addressâ with âAddressâ
arising from the coercion of the method âhasCodecâ
from type âToml.Key -> TomlCodec (TomlTable Address)â
to type âToml.Key -> TomlCodec Addressâ
⢠When deriving the instance for (HasCodec Address)
|
182 | deriving HasCodec via (TomlTable Address)
|
With the example from docs. I don't really know how to solve this issue. Do you have any ideas, @chshersh ?
@vrom911 Ah, sh*t, here we go again. The error is different, but it doesn't tell me how to solve the issue. Well, I guess not in this release...
Should be possible to do after #311 :slightly_smiling_face:
I've tried to use fancy tricks for table codecs with generics. You can find my commented code here:
https://github.com/kowainik/tomland/blob/536a5e6ffb148d0dd4e4c4b120913a6744097676/src/Toml/Codec/Generic.hs#L406-L449
It wasn't possible to implement this feature back then. But thanks to @vrom911 nice work on simplifying the
Codec
type, I think we should be able to implement that feature again.