[Haskell-cafe] Re: Laziness question
jv at informatik.uni-bonn.de
Wed Aug 4 12:04:13 EDT 2010
Nicolas Pouillard schrieb:
> On Wed, 04 Aug 2010 17:47:12 +0200, Janis Voigtländer <jv at informatik.uni-bonn.de> wrote:
>> 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.
>>>> 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:
> I feared a bit... but no
>> 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).
> So foldl''' now has some Typeable constraints.
No, I don't see how it has that. Or maybe you should make explicit under
what conditions a type (a -> b) is in Typeable. What exactly will the
type of foldl''' be, and why?
Jun.-Prof. Dr. Janis Voigtländer
mailto:jv at iai.uni-bonn.de
More information about the Haskell-Cafe