codec
codec copied to clipboard
Easy bidirectional serialization in Haskell
I have figured out how to parse an ADT but am not sure how to serialize it well. Instead of the constructor being the initial function, a function that picks...
It seems like it would be possible to move more of this to the type level using TypeLits Symbol
Using `Generic` its easy to combine multiple codecs into more complex ones. This is especially useful for sum types, which were previously hard to deal with when constructing codecs. It...
This builds on top of PR #4 to use `Codec'` as a `Monad`. This allows to parse formats that are prefixed with some metadata that determines the rest of the...
Trying to type ``` :t (,) $>> f_1 >-< pure () >>> f_2 >-< pure 'a' :: (Applicative fr, Applicative fw) => Codec fr fw ((), Char) ``` results in...
I would like to use codec (a very nice package), but have already made the transition to GHC 8 which this library is currently not compatible with. The fix is...