Records in Haskell

Ian Lynagh igloo at earth.li
Fri Mar 2 01:06:57 CET 2012


On Thu, Mar 01, 2012 at 11:32:27PM +0000, AntC wrote:
> AntC <anthony_clayden <at> clear.net.nz> writes:
> 
> > 
> > Ian Lynagh <igloo <at> earth.li> writes:
> > 
> > > 
> > > But I think you are agreeing that (leaving aside the issue of whether
> > > the design is reasonable) the above variant would indeed allow the user
> > > to choose the behaviour of either SORF or DORF.
> > > 
> > 
> > No, not the "user to choose", but the implementor. We can't possibly try to 
> > support both approaches.
> > 
> 
> Sorry, I mis-interpreted your last paragraph. I think you meant:
> 
> ... allow the user to choose [public or restricted namespacing] behaviour 
> under either the SORF or DORF proposal.

Yes, exactly.

> Yes-ish (leaving aside that issue). Under SORF you hve an extra behaviour:
> - use String Kinds and your label is public-everywhere and
>    completely uncontrollable.
> - (So someone who imports your label can't stop it getting re-exported.)
> - This is unlike any other user-defined name in Haskell.
> 
> I'm not sure whether to call that extra behaviour a 'feature' (I tend more 
> to 'wart'), but it's certainly another bit of conceptual overload.

Right, but other people would prefer the SORF behaviour to the DORF
behaviour.

But note that if this was implemented, then the only difference between
the 3 is in the desugaring. So if you desugar r.f only then you get
SORF, r.F only then you get DORF (well, with different syntax,
probably), and if you desugar both then you get the choice.


Thanks
Ian




More information about the Glasgow-haskell-users mailing list