Records in Haskell

AntC anthony_clayden at clear.net.nz
Fri Mar 2 00:32:27 CET 2012


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-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.

I prefer DORF's sticking to conventional/well-understood H98 namespacing 
controls.


AntC








More information about the Glasgow-haskell-users mailing list