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

Implement 'Selective' instance for 'Codec' #327

Open chshersh opened 4 years ago

chshersh commented 4 years ago

tomland users may want to support parsing that depends on version. Since we don't have Monad instance anymore, it's not possible easily. But the selective package has a function bindS that allows having this case ... of behavior for Enum fields (which is how I expect versions to be implemented).