packages feed

diagrams-builder 0.3 → 0.3.0.1

raw patch · 3 files changed

+13/−6 lines, 3 filesdep −base16-bytestringdep ~cryptohashPVP ok

version bump matches the API change (PVP)

Dependencies removed: base16-bytestring

Dependency ranges changed: cryptohash

API changes (from Hackage documentation)

Files

CHANGES.markdown view
@@ -1,3 +1,9 @@+0.3.0.1 (3 April 2013)+----------------------++* depend on cryptohash >= 0.8 && < 0.10 (use new unified API)+* remove base16-bytestring dependency+ 0.3: 3 Feburary 2013 -------------------- 
diagrams-builder.cabal view
@@ -1,5 +1,5 @@ name:                diagrams-builder-version:             0.3+version:             0.3.0.1 synopsis:            hint-based build service for the diagrams graphics EDSL.  description:         @diagrams-builder@ provides backend-agnostic tools for@@ -52,9 +52,8 @@                        directory,                        filepath,                        haskell-src-exts >= 1.13.1 && < 1.14,-                       cryptohash >= 0.7.4 && < 0.9,+                       cryptohash >= 0.8 && < 0.10,                        bytestring >= 0.9.2 && < 0.11,-                       base16-bytestring >= 0.1.1 && < 0.2,                        cmdargs >= 0.6 && < 0.11   hs-source-dirs:      src   default-language:    Haskell2010
src/Diagrams/Builder.hs view
@@ -49,10 +49,9 @@ import System.FilePath import System.Directory -import Crypto.Hash.MD5+import Crypto.Hash (Digest, MD5, digestToHexByteString, hash)  import qualified Data.ByteString.Char8 as B-import Data.ByteString.Base16 import Data.List (nub) import Data.Typeable deriving instance Typeable Any@@ -248,8 +247,11 @@                                         -- the diagram depends.                  -> IO (String, Maybe (a -> a)) hashedRegenerate upd dir src = do-  let fileBase = B.unpack . encode . hash . B.pack $ src+  let fileBase = hashStr src   files <- getDirectoryContents dir   case any ((fileBase==) . takeBaseName) files of     True  -> return (fileBase, Nothing)     False -> return (fileBase, Just (upd fileBase))++hashStr :: String -> String+hashStr = B.unpack . digestToHexByteString . (hash :: B.ByteString -> Digest MD5) . B.pack