<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
I wrote this little clip, and haven't been able to figure out why the L.ByteString is different type than Data.ByteString.Internal.ByteString, or if I am just doing everything wrong here.<BR><br><BR><br><BR>import System.FilePath<br><BR>import System.Environment<br>import qualified Data.ByteString.Lazy as L<br>import qualified Crypto.Hash.SHA1 as SH<br>import Data.Hex (hex)<br><br><br><br>hashFile :: FilePath -&gt; IO L.ByteString<br>hashFile f = do<br>     content &lt;- L.readFile f<br>     let hasher = SH.init<br>             bhsh = SH.update hasher content<br>     return (hex (SH.finalize bhsh))<br><br><BR>I really just want to get the digest of a file as a [Char], but then of course, SH.update is not very happy about the type I am passing to it either.<BR><br><BR>Can't wait till this becomes easy! <BR><br><BR>Roderick<BR>                                               </body>
</html>