brandonchinn178 / toml-reader

Haskell library for parsing v1.0 TOML files
https://hackage.haskell.org/package/toml-reader
BSD 3-Clause "New" or "Revised" License
13 stars 6 forks source link

Add decodeToml function to type class? #21

Open brandonchinn178 opened 1 year ago

brandonchinn178 commented 1 year ago

For some instances of DecodeTOML, it might be more ergonomic to define in terms of Value -> DecodeM a, even while the Decoder interface is good for the common case.

We could allow implementing either and define them in terms of each other

tomlDecoder = makeDecoder decodeToml
decodeToml = runDecoder tomlDecoder