[Haskell-cafe] Re: Laziness question

Janis Voigtländer jv at informatik.uni-bonn.de
Wed Aug 4 11:47:12 EDT 2010

Nicolas Pouillard schrieb:
> On Wed, 04 Aug 2010 17:27:01 +0200, Janis Voigtländer <jv at informatik.uni-bonn.de> wrote:
>> Nicolas Pouillard schrieb:
>>> However the rule is still the same when using an unsafe function you are on
>>> your own.
>>> Clearer?
>> Almost. What I am missing is whether or not you would then consider your
>> genericSeq (which is applicable to functions) one of those "unsafe
>> functions" or not.
> I would consider it as a safe function.

Well, then I fear you have come full-circle back to a non-solution. It
is not safe:

Consider the example foldl''' from our paper, and replace seq therein by
your genericSeq. Then the function will have the same type as the
original foldl, but the standard free theorem for foldl does not hold
for foldl''' (as also shown in the paper).


Jun.-Prof. Dr. Janis Voigtländer
mailto:jv at iai.uni-bonn.de

More information about the Haskell-Cafe mailing list