[Haskell-cafe] Is it safe to use unsafePerformIO here?

Cristiano Paris frodo at theshire.org
Tue Sep 15 17:00:40 EDT 2009

On Tue, Sep 15, 2009 at 10:42 PM, Daniel Fischer
<daniel.is.fischer at web.de> wrote:
> ....
> Aaawww.
> let b' = length b
> or
> let b' = foldl' seq () b
> or
> let b' = b `using` rnf
> if you want to force the whole file to be read. But then you should definitely be using
> ByteStrings.

Yep. But that doesn't solve the original problem of not reading the
body at all when not needed. Unless using unsafePerformIO.


More information about the Haskell-Cafe mailing list