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

Donn Cave donn at avvanta.com
Mon Jan 30 16:25:09 CET 2012

Quoth Steve Horne <sh006d3592 at blueyonder.co.uk>,
> On 30/01/2012 07:09, Donn Cave wrote:

>> ((separate . crack . .smallEnd) egg).yolk
>> (f egg).yolk where f = separate . crack . .smallEnd
> Scary - that ".smallEnd" worries me. It's like a field is being 
> referenced with some magical context from nowhere.
> Obviously I need to read that full proposal.

As I said:
> (assuming for the sake of discussion a functional dot notation
>  .field = \ r -> r.field)

By that, I meant to say that I just made that up.  I am sure that
various proposals have made some notational provision for `\ r -> r.field',
but it may or may not be `.field', I don't recall.

But that's all the magic there is to it.  Either you have a notational
shorthand for it, or you're obliged to write out `\ r -> r.field'


More information about the Haskell-Cafe mailing list