Records in Haskell

Ian Lynagh igloo at earth.li
Thu Sep 15 16:43:51 CEST 2011


On Thu, Sep 15, 2011 at 08:47:30AM +0000, Simon Peyton-Jones wrote:
> 
> Provoked the (very constructive) Yesod blog post on "Limitations of Haskell", and the follow up discussion, I've started a wiki page to collect whatever ideas we have about the name spacing issue for record fields.
> 
>                 http://hackage.haskell.org/trac/ghc/wiki/Records
> 
> As Simon M said on Reddit, this is something we'd like to fix; but we need a consensus on how to fix it.

Re TypeDirectedNameResolution, I would actually prefer it if it were
less general. i.e. if you were to write
    x.f
then f would be required to be a record selector.

Then there's no need for the "If there is exactly one f whose type
matches that of x" unpleasantness. Instead, the type of x must be
inferred first (without any knowledge about the type of f), and then we
know immediately which f is being referred to.


Thanks
Ian




More information about the Glasgow-haskell-users mailing list