[Haskell-cafe] Re: Proposal: TypeDirectedNameResolution

Henning Thielemann lemming at henning-thielemann.de
Mon Aug 3 17:56:25 EDT 2009

Heinrich Apfelmus schrieb:

> Sure, overloading is useful. But to avoid headache in a polymorphic
> language, I'd prefer a principled approach to it. Hence, I'm convinced
> that there should be only one mechanism for overloading in Haskell;
> which is type classes at the moment.
> It appears that type direction name disambiguation can be implemented
> with (automatically generated) type classes?

When thinking about how to make Haskell familiar to SQL programmers I
also thought that a Haskell compiler might automatically generate a type
class and according instances, such that an identifier like 'field' can
be used for all record types that have a field with name 'field'. I'm
sure Template Haskell programmers can achieve this already with todays GHC.

In the meantime I'm happy with writing qualifications, type signatures
and so on. I don't know why people like to avoid them at all costs.

More information about the Haskell-Cafe mailing list