packages feed

crc 0.0.1.1 → 0.1.0.0

raw patch · 4 files changed

+25/−12 lines, 4 filesdep ~conduitPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: conduit

API changes (from Hackage documentation)

+ Data.Digest.CRC: type family CRCWord a = r | r -> a;
+ Data.Digest.CRC: }
- Data.Digest.CRC: class CRC a where type family CRCWord a
+ Data.Digest.CRC: class CRC a where {

Files

+ changelog.md view
@@ -0,0 +1,3 @@+0.1.0.0+* Update deps+* Allow newer GHC versions
crc.cabal view
@@ -1,5 +1,5 @@ name:                crc-version:             0.0.1.1+version:             0.1.0.0 synopsis:            Implements various Cyclic Redundancy Checks (CRC) description:         ByteString-based Cyclic Redundancy Checks homepage:            http://github.com/MichaelXavier/crc@@ -10,7 +10,8 @@ copyright:           2015 Michael Xavier category:            Web build-type:          Simple--- extra-source-files:+extra-source-files:+  changelog.md cabal-version:       >=1.10  flag lib-Werror@@ -43,7 +44,7 @@                      , crc                      , tasty                      , tasty-golden-                     , conduit+                     , conduit >= 1.2.8                      , conduit-extra                      , bytestring                      , resourcet
src/Data/Digest/CRC.hs view
@@ -1,4 +1,9 @@-{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE CPP                    #-}+#if __GLASGOW_HASKELL__ >= 800+{-# LANGUAGE TypeFamilyDependencies #-}+#else+{-# LANGUAGE TypeFamilies           #-}+#endif module Data.Digest.CRC     ( CRC(..)     , digest@@ -14,7 +19,11 @@   class CRC a where+#if __GLASGOW_HASKELL__ >= 800+  type CRCWord a = r | r -> a+#else   type CRCWord a+#endif   initCRC :: a   crcWord :: a -> CRCWord a   updateDigest :: a -> ByteString -> a
test/Main.hs view
@@ -14,7 +14,7 @@ import           Data.Conduit import           Data.Conduit.Binary          as CB import           Data.Conduit.List            as CL-import           Data.Monoid+import           Data.Monoid                  as M import           Data.Proxy import           Data.Word import           Test.Tasty@@ -47,13 +47,13 @@ digestGolden :: forall a. (CRC a, HexBuilder (CRCWord a)) => FilePath -> Proxy a -> TestTree digestGolden f _ = goldenVsString f goldenPath mkDigests   where-    goldenPath = "test/data/" <> f-    mkDigests = runResourceT $-      sourceFile "test/data/inputs" =$=-        CB.lines =$=-        CL.map digest =$=-        CL.map (toHex :: a -> ByteString) =$=-        CL.map toHexLine $$+    goldenPath = "test/data/" M.<> f+    mkDigests = runResourceT $ runConduit $+      sourceFile "test/data/inputs" .|+        CB.lines .|+        CL.map digest .|+        CL.map (toHex :: a -> ByteString) .|+        CL.map toHexLine .|         sinkLbs