Proposal: generalize evaluate

Michael Snoyman michael at snoyman.com
Wed Jan 7 15:44:03 UTC 2015


-1 from me, adding things to base like this is a step backwards IMO. I
don't see a problem with adding a generalize evaluate to primitive as well,
however. We could also consider adding an evaluateST function somewhere in
base, if that was desired (I've personally never needed it, but I could
imagine it being useful).

On Wed Jan 07 2015 at 5:41:06 PM David Feuer <david.feuer at gmail.com> wrote:

> Apparently, there was an issue with my last messages about this for some
> people, so here's the idea again:
>
> We could generalize Control.Exception.evaluate to
>
> evaluate :: PrimMonad m => a -> m a
> evaluate a = primitive (\s -> seq# a s)
>
> and then export it from Control.Monad.Primitive as well, which seems to me
> a much more natural place for it. The only challenge is that the PrimMonad
> class would need to be moved to base.
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20150107/004bda09/attachment.html>


More information about the Libraries mailing list