monad-codec 0.1.0 → 0.1.1
raw patch · 2 files changed
+5/−4 lines, 2 files
Files
- Control/Monad/Codec.hs +4/−3
- monad-codec.cabal +1/−1
Control/Monad/Codec.hs view
@@ -6,9 +6,8 @@ -- simplest case the entire sturecture can be transformed to unique -- atom (see 'example1' below). When it is not sufficient to encode -- the input object with one codec, more complex codec structure can--- be used (see 'example2' below). In order to simplify codec--- manipulations the library relies on a 'lens' package which provides--- lenses for typical data types.+-- be used (see 'example2' below). The library relies on a 'data-lens'+-- package which provides types and functions for codec manipulations. -- -- Example: --@@ -161,5 +160,7 @@ execCodec :: c -> Codec c a -> c execCodec codec (Codec state) = S.execState state codec +-- | Identity lenses should be used whenever the structure of the codec+-- is simple, i.e. only one atomic codec is used. idLens :: Lens a a idLens = iso id id
monad-codec.cabal view
@@ -1,5 +1,5 @@ name: monad-codec-version: 0.1.0+version: 0.1.1 synopsis: Monadic conversion between complex data structures and unique integers description: The library provides functions for encoding and decoding complex data