Discussion: Can we make evaluate easier to find?

David Feuer david.feuer at gmail.com
Wed Jan 7 20:30:26 UTC 2015


Isn't it the official way to make sure lazy IO gets performed before a
file is closed, or is ($!) actually safe for that? (I really and truly
can't understand all the details of what goes on in the rather old bug
reports relating to the implementation of evaluate).

On Wed, Jan 7, 2015 at 3:27 PM, John Lato <jwlato at gmail.com> wrote:
> I agree that Control.Exception seems like a very strange place for
> `evaluate` to be publicly exported.  However, I've never wanted that
> function except in the context of forcing evaluation of a pure value in
> order to catch exceptions.  I also can't think of any other use cases that
> aren't more easily solved by seq/bang patterns.  If the only use case is in
> fact exception handling, Control.Exception seems like a pretty good
> location.
> On Wed Jan 07 2015 at 11:45:39 AM Henning Thielemann
> <lemming at henning-thielemann.de> wrote:
>>
>>
>> > On Tue, Jan 6, 2015 at 11:36 PM, David Feuer <david.feuer at gmail.com>
>> > wrote:
>>
>> >> The evaluate function is defined in GHC.IO, and exported publicly by
>> >> Control.Exception. This strikes me as an extremely strange place for
>> >> it.
>>
>> I also find the place strange. If there would be a module with a type
>> class for seq (like Eval), it would be certainly a good place for
>> 'evaluate'.
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://www.haskell.org/mailman/listinfo/libraries


More information about the Libraries mailing list