packages feed

describe 0.2.0.5 → 0.2.0.6

raw patch · 3 files changed

+9/−1 lines, 3 filesPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

API changes (from Hackage documentation)

+ Data.Serialize.Describe.Combinators: isolate :: Int -> Descriptor s a -> Descriptor s a

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for describe +##0.2.0.6 -- 2019-10-08++* Added `isolate` combinator.+ ## 0.2.0.5 -- 2019-10-07  * Added the `Remaining` combinator.
describe.cabal view
@@ -3,7 +3,7 @@ --   For further documentation, see http://haskell.org/cabal/users-guide/  name:                describe-version:             0.2.0.5+version:             0.2.0.6 synopsis:            Combinators for describing binary data structures description:         Combinators for describing binary data structures, which eliminate the boilerplate of having to write isomorphic Get and Put instances. Please see the Github page for examples. homepage:            https://github.com/riugabachi/describe
src/Data/Serialize/Describe/Combinators.hs view
@@ -1,5 +1,6 @@ -- | Various type-level combinators to ease generic derivation of 'Describe' module Data.Serialize.Describe.Combinators(+  isolate,   Remaining(..),   Optional(..),   Predicate(..),@@ -16,6 +17,9 @@ import Data.Vector.Fixed.Boxed (Vec) import qualified Data.Serialize.Get as G import qualified Data.Serialize.Put as P++isolate :: Int -> Descriptor s a -> Descriptor s a+isolate amt desc = Descriptor (G.isolate amt $ unwrapGet desc, flip unwrapPut desc)  -- | A  'Remaining' represents the rest of the buffer. Upon serialization, the entire wrapped ByteString will be written. newtype Remaining = Remaining { unwrapRemaining :: ByteString }