<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
I need the trick to get from <BR>
<FONT face="Courier New">ByteString -&gt; [GHC.Word.Word8]</FONT><BR>
and Hayoo is not helping.<BR>
&nbsp;<BR>
Super simple I expected.&nbsp; I haven't even tried to compile it yet.<BR>
I am just trying to read in the bytes and encode with base64:<BR>
&nbsp;<BR>
<FONT face="Courier New">import Codec.Binary.Base64<BR>import Data.ByteString<BR>import System.Directory<BR>import System.Environment</FONT><BR>
<FONT face="Courier New">main :: do<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;args &lt;- getArgs<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bFileExist &lt;- System.Directory.doesFileExist (args !! 0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let bytedata = --ByteString -&gt; [GHC.Word.Word8]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if bFileExist then putStrLn $ Codec.Binary.Base64.encode bytedata<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else putStrlLn ("File does not exist: " ++ (args !! 0))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return ()</FONT><BR>                                               </body>
</html>