Hi Paul,

On Dec 18, 2007 5:18 PM, Paul Hudak <[EMAIL PROTECTED]> wrote:
>  If the semantics of a language says that a function f is equivalent to a
> function g, but there is a function h such that h(f) is not equivalent to
> h(g), then h cannot be a function.

Sure.

> Therefore that language cannot be a
> (purely) functional language.
>
>  That is the pure and simple reason why functions are not Showable in
> Haskell.

Not so fast :-)

Caveat one, there may be useful ways to for functions to implement
Show that don't conflict with extensionality (i.e., the property that
two functions are equal if they yield the same results for all
inputs).

Caveat two, we generally assume extensionality when reasoning about
Haskell, but it's entirely possible to give a semantics for Haskell
that doesn't assume extensionality. IMHO, a good answer to the
question why functions aren't showable in Haskell needs to explain why
we prefer our semantics to be extensional, not say that by god-given
fiat, Haskell is extensional, so we can't show functions.

- Benja
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to