[Haskell-cafe] Clean proof -- correction

Derek Elkins derek.a.elkins at gmail.com
Sun May 23 13:30:38 EDT 2010


On Sun, May 23, 2010 at 11:38 AM, Daniel Fischer
<daniel.is.fischer at web.de> wrote:
> On Sunday 23 May 2010 18:24:50, R J wrote:
>> Correction:  the theorem is
>>     h . either (f, g) = either (h . f, h . g)
>
> Still not entirely true,
>
> const True . either (undefined, undefined) $ undefined = True
>
> while
>
> either (const True . undefined, const True . undefined) undefined =
> undefined
>
> But if we ignore bottom,

If we ignore bottom we say "By parametricity."  The theorem is a free theorem.


More information about the Haskell-Cafe mailing list