[Haskell-cafe] Type Directed Name Resolution

Lauri Alanko la at iki.fi
Wed Nov 10 14:08:56 EST 2010


On Wed, Nov 10, 2010 at 11:59:28AM +0200, John Smith wrote:
> http://hackage.haskell.org/trac/haskell-prime/wiki/TypeDirectedNameResolution

The problem with this is that it conflates two orthogonal features:
type-directed name resolution proper (also known as ad hoc
overloading), and a fancy postfix application syntax. There is no
connection between these except that both are useful for accessing
records in a particular way.

So the proposal seems to be tailored specifically to fix some
inconveniences with records. I'd much rather see a true record system
for Haskell, since that would fix the namespace conflict problem in a
more robust way.

Plain ad hoc overloading might or might not be a sensible addition to
Haskell, but please at least drop the "x .f" syntax, it's a pointless
hack that makes the lexical status of "." even more difficult than it
currently is. After all, one can simply define e.g. "x .$ f = f x" if
postfix application is needed.

Cheers,


Lauri


More information about the Haskell-Cafe mailing list