Currently, we have the following Codec abstract data type:
data Codec r w c a = Codec
{ codecRead :: r a
, codecWrite :: c -> w a
}
But in this library it's used only for TomlCodec:
type TomlCodec a = Codec Env St a a
It could be a good simplification to combine two and have
data Codec in out = Codec
{ codecRead :: TomlEnv out
, codecWrite :: in -> TomlState out
}
type TomlCodec a = Codec a a
What do you think? With this approach, we can have a single module Toml.Codec with all general functions, encoding and decoding functions instead of two modules Toml.Monad and Toml.Code
Currently, we have the following
Codec
abstract data type:But in this library it's used only for
TomlCodec
:It could be a good simplification to combine two and have
What do you think? With this approach, we can have a single module
Toml.Codec
with all general functions, encoding and decoding functions instead of two modulesToml.Monad
andToml.Code