Re: Magic classes for Overloaded Record Fields, overlaps, FunDeps

2016-05-15 Thread AntC
> Simon Peyton Jones microsoft.com> writes: > Hi Simon, I don't think there's an 'issue' in the sense fundeps can achieve something that type-families can't (or v.v.). It's more about elegance and ergonomics of the code to achieve it. (I'll try to avoid a question of judgment shading into a mat

Re: Magic classes for Overloaded Record Fields, overlaps, FunDeps

2016-04-27 Thread AntC
> > The labelled "birthday = ..." approach seems > tantalisingly close to data constructors: >( Name "Fred", Birthday $ Date 28 4 2016 ) > > Which takes us (perhaps) to HLIst-style > Type-Indexed Products. > How could they fit with ORF? > Perhaps introduce an implicit label spelled same as the

Re: Magic classes for Overloaded Record Fields, overlaps, FunDeps

2016-04-27 Thread AntC
> Adam Gundry well-typed.com> writes: > ... > > P.S. If you have any thoughts on the interaction between ORF and > encodings of anonymous records, I'd be interested to hear them. Are you sure you want to open up that question? ;-) Nikita's record library has certainly given food for thought. Be

RE: Magic classes for Overloaded Record Fields, overlaps, FunDeps

2016-04-27 Thread Simon Peyton Jones
| > I have been vacillating between type families and fundeps for the ORF | > classes. I hadn't fully appreciated this point about overlap, but I | > think it is a reason to prefer fundeps, which is the direction in | > which I'm leaning. I'd be grateful for feedback on this issue though! ...

Re: Magic classes for Overloaded Record Fields, overlaps, FunDeps

2016-04-26 Thread AntC
> > On 26/04/16 09:20, AntC wrote: > > There's an intriguing comment here wrt anonymous records: ... > > I'm afraid the sentence on the wiki page is slightly misleading, ... > with the change to functional dependencies, > the overlapping instances solution works rather nicely, > in that it works

Re: Magic classes for Overloaded Record Fields, overlaps, FunDeps

2016-04-26 Thread Adam Gundry
Hi AntC, On 26/04/16 09:20, AntC wrote: > There's an intriguing comment here wrt anonymous records: > https://ghc.haskell.org/trac/ghc/wiki/Records/OverloadedRecordFields/ > MagicClasses#Designextension:anonymousrecords > (End of the section) > > "... this doesn't quite work, because the two inst