Magic classes for Overloaded Record Fields, overlaps, FunDeps

AntC anthony_clayden at
Tue Apr 26 08:20:31 UTC 2016

There's an intriguing comment here wrt anonymous records:
(End of the section)

"... this doesn't quite work, because the two instances overlap,
 but it is possible with a bit more trickery"

I could well understand if everybody's forgotten what was the "trickery", 
because ORF has been so long in the pipeline, but could anyone explain?

Reason for the q: I'm looking at anonymous records myself,
 including extending, shortening and joining anon records. 
And yes overlapping instances are everywhere.

Using type families isn't being too ergonomic. And I notice ORF has used FunDeps.
But for me, FunDeps in the HList style is also rather ugly.

Is there some trickery I'm missing?


More information about the Glasgow-haskell-users mailing list