[Haskell-cafe] PrimMonad for Control.Monad.ST.Lazy?

Christopher Done chrisdone at gmail.com
Thu Apr 9 09:23:48 UTC 2015


I would hesitantly say that PrimMonad's types are all unboxed and this
means that any instance of it is inherently strict. Lazy state monad relies
on the laziness of the tuple it uses to hold the state, for example.

On 9 April 2015 at 04:49, Ken Takusagawa II <ken.takusagawa.2 at gmail.com>
wrote:

> I notice that the strict ST monad has an instance for PrimMonad but the
> lazy ST monad does not.  Is there a reason why, or is merely an oversight?
>
> (What I Am Really Trying To Do: get a purely lazy stream of random values
> out of mwc-random.)
>
> --ken
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150409/ebf448b8/attachment.html>


More information about the Haskell-Cafe mailing list