[Haskell-cafe] Some thoughts on Type-Directed Name Resolution

Donn Cave donn at avvanta.com
Tue Jan 31 16:43:58 CET 2012

Quoth AntC <anthony_clayden at clear.net.nz>,
> My proposal is that field selection functions be just ordinary functions, and 
> dot notation be just function application(tight-binding). Then:
>       object.fieldfuncmethod   ==> fieldfuncmethod object
> (Subject to the tight binding for the dot.)
> And one-sided dot application is pointless (! errk I mean 'without purpose', 
> no different to writing the bare object or bare fieldfuncmethod).

That's interesting!  The wiki page on SORF (Simple Overloaded Record Fields,
has some language that, as I interpreted it, meant that Has/Get syntactic
sugar depended on the dot, so it's indispensable.  Your proposal actually
has some similar language but, I see you don't mean it that way.  That's
great news for anyone who's really dying to get somewhere with records,
if it means that the functionality could in principle be introduced
independently of changes to the interpretation of "." that would break
a lot of code.


More information about the Haskell-Cafe mailing list