[Haskell-beginners] problem with lazy IO

Dennis Raddle dennis.raddle at gmail.com
Thu Nov 10 02:04:12 CET 2011


Ah yes, so my first problem was not using the Char8 version, so 'unpack'
was getting me [Word8] instead of [Char]


On Wed, Nov 9, 2011 at 3:57 PM, Daniel Fischer <
daniel.is.fischer at googlemail.com> wrote:

> On Thursday 10 November 2011, 00:48:20, Dennis Raddle wrote:
> > It was a pain putting "map (chr . fromIntegral)" in front of everything
> > to get regular strings.
>
> import qualified Data.ByteString.Char8 as C
>
>  foo <- C.unpack `fmap` C.readFile whichever
>
> You don't need to put it *everywhere*
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20111109/bff7dcb8/attachment.htm>


More information about the Beginners mailing list