Open
Description
I'm wondering what the preferred way of writing a de/encode instance for Data.Map
would be?
I have an initial implementation in a fork here ( rubenpieters@e2f24ed ).
Some choices I made:
- Convert the
Data.Map
from/to aData.StrMap
, then encode/decode it similarly toData.StrMap
's instance - All keys are first converted to
String
s, so I introduced anEncodeKey
/DecodeKey
class which can encode or decode keys to/fromString
respectively
Also in the initial implementation only the first decoding error is reported, I think the current StrMap
doesn't report all decoding errors either. But that can definitely be fixed.
There are a lot of possibilities, so maybe it would be interesting to discuss the preferred way of doing it first.
Metadata
Metadata
Assignees
Labels
No labels