1. Yes, it’s similar to OverloadedRecordFields but doesn’t force you to use a label, and you may use Tagged to label a field if you want.
2. Yes, but again, you can use Tagged to allow same type in different disguise.


On 22 Nov 2016, at 11:32, Brandon Allbery <allbery.b@gmail.com> wrote:


On Mon, Nov 21, 2016 at 10:30 PM, winter <drkoster@qq.com> wrote:
To illustrate, first i want to create a class like:

class Has a t where
    get :: t -> a

Does this differ significantly from fclabels or the upcoming OverloadedRecordFields extension? (Aside from being purely type driven, which has problems in your example if you compose a second Int into it.)


--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net