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

Daniel Fischer daniel.is.fischer at web.de
Tue Sep 15 16:29:47 EDT 2009

Am Dienstag 15 September 2009 22:17:00 schrieb Cristiano Paris:
> On Tue, Sep 15, 2009 at 10:12 PM, Ross Mellgren <rmm-haskell at z.odi.ac> wrote:
> > Wouldn't seq b only force (at minimum) the first character of the file?
> I think it force the evaluation of the "Cons" in the String but not
> the characters therein.

It evaluates the String far enough to know whether it's "" or (_:_), that is, to weak head 
normal form. It doesn't look at any character, but it forces at least one character to be 
read from the file.

> Cristiano

More information about the Haskell-Cafe mailing list