packages feed

describe 0.1.2.0 → 0.1.2.1

raw patch · 3 files changed

+8/−4 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Data.Serialize.Descriptor: unwrapPut :: s -> Descriptor s a -> PutM ()
+ Data.Serialize.Descriptor: unwrapPut :: s -> Descriptor s a -> PutM a

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for describe +## 0.1.2.1 -- 2019-09-08++* Fixed unwrapPut / serialize.+ ## 0.1.2.0 -- 2019-09-08  * Fixed Monad instance.
describe.cabal view
@@ -3,7 +3,7 @@ --   For further documentation, see http://haskell.org/cabal/users-guide/  name:                describe-version:             0.1.2.0+version:             0.1.2.1 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/Descriptor.hs view
@@ -20,12 +20,12 @@ unwrapGet = fst . unwrapDescriptor  -- | @unwrapPut s desc@ takes the structure being described and a 'Descriptor' for it, and returns the internal 'Put' monad.-unwrapPut :: s -> Descriptor s a -> PutM ()-unwrapPut s = ($ s) . snd . unwrapDescriptor . (>> pure ())+unwrapPut :: s -> Descriptor s a -> PutM a+unwrapPut s = ($ s) . snd . unwrapDescriptor  -- | Convenience function for @runPut . unwrapPut s@ serialize :: s -> Descriptor s a -> ByteString-serialize s = snd . runPutM . unwrapPut s . (>> pure ())+serialize s = snd . runPutM . unwrapPut s  -- | Convenience function for @flip runGet bs . unwrapGet@ deserialize :: ByteString -> Descriptor s s -> Either String s