packages feed

binary-generic 0.2 → 0.2.1

raw patch · 2 files changed

+5/−4 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

binary-generic.cabal view
@@ -1,5 +1,5 @@ name:            binary-generic-version:         0.2+version:         0.2.1 license:         BSD3 license-file:    LICENSE author:          Lars Petersen <info@lars-petersen.net>@@ -16,7 +16,7 @@ stability:       experimental build-type:      Simple cabal-version:   >= 1.2-tested-with:     GHC == 6.12.1+tested-with:     GHC == 7.0.3 extra-source-files: README   library
src/Data/Binary/Generic.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS -XNoMonomorphismRestriction -XRankNTypes #-}+{-# OPTIONS -XRankNTypes #-}  ----------------------------------------------------------------------------- -- |@@ -84,7 +84,8 @@                                else error $ "getGeneric: `" ++ typeName ++ "' is not algebraic."  putGenericByCallback    :: Data a => (forall d. Data d => d -> Put) -> a -> Put -putGenericByCallback c t = let i        = fromIntegral $ constrIndex (toConstr t) - 1 +putGenericByCallback c t = let i :: Num b => b+                               i        = fromIntegral $ constrIndex (toConstr t) - 1                                imax     = maxConstrIndex (dataTypeOf t)                                 typeName = showsTypeRep (typeOf t) ""                                putIndex | imax == 0     = error "putGeneric: constructor count is 0."