packages feed

describe 0.4.0.3 → 0.4.0.4

raw patch · 3 files changed

+9/−5 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for describe +##0.4.0.4 -- 2020-02-07++* Changed `describeVia` semantics+ ##0.4.0.3 -- 2020-02-07  * Added `describeVia` as an alternative to now-nonfunctional DerivingVia
describe.cabal view
@@ -1,6 +1,6 @@ cabal-version:       2.4 name:                describe-version:             0.4.0.3+version:             0.4.0.4 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/Class.hs view
@@ -43,18 +43,18 @@ -- | An alternative to DerivingVia, as the type variable @a@ of @Describe@ is bound to the type family @Context@ making its role @nominal@, and subsequently, uncoercible as per the semantics of DerivingVia. A restriction exists, however: both of the types specified must be @Coercible@. describeVia    :: Name -  -- ^ The type to inherit @describe@ from+  -- ^ The type wrapper to inherit @describe@ from; must be of type (* -> *)   -> Name   --  ^ The type to create a @Describe@ instance for   -> Q [Dec]-describeVia src dst =+describeVia wrp dst =   [d|      instance Describe $destination where-      type Context m $destination = Context m $source+      type Context m $destination = Context m ($wrapper $destination)       describe = lmap coerce coerce describe   |]   where-    source = conT src+    wrapper = conT wrp     destination = conT dst  -- | A descriptor from structure to field.