[Haskell] [ANN] Safe Lazy IO in Haskell

Nicolas Pouillard nicolas.pouillard at gmail.com
Mon May 18 13:30:08 EDT 2009


Excerpts from Jason Dusek's message of Sun May 17 15:45:25 +0200 2009:
>   From the documentation:
> 
>  "  LI could be a strict monad and a strict applicative functor.
>     However it is not a lazy monad nor a lazy applicative
>     functor as required Haskell. Hopefully it is a lazy
>     (pointed) functor at least.

The type I would need for bind is this one:

  (>>=) :: NFData sa => LI sa -> (sa -> LI b) -> LI b

And because of the NFData constraint this type bind is less general than the
required one.

BTW this operator is exported as (!>>=) by System.IO.Lazy.Input.Extra.

By using the rmonad we could add this NFData constraint, but that's not like
having a Monad instance directly.

Best regards,

-- 
Nicolas Pouillard


More information about the Haskell mailing list