[Haskell-cafe] "show" for functional types

Neil Mitchell ndmitchell at gmail.com
Sat Apr 1 07:39:07 EST 2006

> > now superShow f /= superShow g, so they are no longer referentially transparent.
>     OK.  I'm probably being really dense today, but where did "g" come
> from?
Nope, I was being super dense, for "g" read "not"...

superShow f = "not"
superShow not = "\x -> case x of {True -> False; False -> True}"

superShow f /= superShow not

> And does this loss
> of referential transparency contaminate the rest of the language, or is
> this superShow just an anomaly?
Once you have any loss of transparency, you loose it totally. You
would then have to go about proving that superShow was not called
anywhere in the vicinity of the transformation you wish to appy,
inlining by the compiler would no longer be safe...



More information about the Haskell-Cafe mailing list