[Haskell-cafe] Status of TypeDirectedNameResolution proposal?

Stephen Tetley stephen.tetley at gmail.com
Thu Nov 19 03:45:03 EST 2009

2009/11/18 Twan van Laarhoven <twanvl at gmail.com>:

> The TDNR proposal really tries to do two separate things:
>  1. Record syntax for function application.
>    The proposal is to tread "x.f" or a variation thereof the same as "(f x)"
>  2. Type directed name lookup.
>    The proposal is to look up overloaded names based on the type of the
> first function argument.
> Why can't these be considered separately? Is there a good reason for not
> using TDNR in normal function applications? The only argument I can think of
> (compared to the record syntax) is that it would be a bigger change.

Hi Twan

Using the T combinator renamed to (#) for "x.f" was idiomatic Haskell
a decade ago, vis:

'Client-side Web Scripting with HaskellScript" Erik Meijer, Daan
Leijen and James Hook
(PADL 1999)

'Modelling HTML in Haskell' Peter Thiemann (PADL 2000)

Quoting Erik Meijer et al.:

To reflect the influence of the OO style,
we will use the postfix function application
  object # method = method object
to mimic the object.method notation.

For your first point, I'd vote for adding (#) to Data.Function...

Best wishes


More information about the Haskell-Cafe mailing list