kowainik / tomland

🏝 Bidirectional TOML serialization
https://kowainik.github.io/posts/2019-01-14-tomland
Mozilla Public License 2.0
120 stars 39 forks source link

Generic codec for Map should accept tables #428

Open ncfavier opened 1 year ago

ncfavier commented 1 year ago
data Config = Config { foo :: Map Text Text } deriving Generic
foo = { "bar" = "baz" }
tomland decode error:  The following fields are present in TOML but not used:
[foo]
  "bar" = "baz"

There is no reason for this to fail, the intent is clear.