
L.S., I hope someone can help me with the following: I am trying to check the SHA1 hash of a file, using the package cryptohash [0]; the following error message is displayed when I try to compile my program: SHA1check.lhs:35:32: Couldn't match expected type `B.ByteString' against inferred type `Data.ByteString.Internal.ByteString' In the second argument of `(.)', namely `hashlazy' In the second argument of `(.)', namely `B.unpack . hashlazy' In the first argument of `(<$>)', namely `show . B.unpack . hashlazy' The relevant lines of code are:
import qualified Data.ByteString.Lazy as B import Data.CryptoHash.SHA1 ( hashlazy )
hash <- show . B.unpack . hashlazy <$> B.hGetContents h
There is only one version of the bytestring package installed. Details: - Windows XP - bytestring-0.9.1.7 - cryptohash-0.5.1 - Haskell Platform 2010.2.0.0 Regards, Henk-Jan van Tuyl P.S. A patch is needed if you want to install cryptohash with MinGW [0] http://hackage.haskell.org/package/cryptohash -- http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html --