-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tableMap codec with list value is irreversible #335
Comments
Hi @samhh, can you also tell what output you expect from the codec? It's not clear what's the problem. |
Hey @chshersh, In my real codebase I do have explicit type signatures, just tried to write a pared down repro. 🙂 What's confusing me is that the encoded value cannot be decoded - is this expected behaviour? I'd generally expect |
@samhh Thanks for more details! From the implementation of the |
My use case is something I've just started working on. I'm using TOML for user configuration and, until I'm given a compelling reason not to, also for data caching. The structure of said data is currently like this: data Cache = Cache
{ timestamp :: LocalTime,
feeds :: Map PodcastId (Map EpisodeId Episode)
} I'm contemplating changing that to this, which prompted this ticket: data Cache = Cache
{ timestamp :: LocalTime,
feeds :: Map PodcastId [Episode]
} |
That's working perfectly, many thanks! |
Me again! 👋
It's possible I'm misusing the codecs. I've tried and failed to simplify the repro beyond this point, hopefully this helps.
The encoded value looks like this written to a file with
Toml.encodeToFile
:The text was updated successfully, but these errors were encountered: