[Haskell-cafe] An idea on extensible effects (anonymous record)
drkoster at qq.com
Tue Nov 22 09:27:52 UTC 2016
> Which brings us back to fclabels I suppose.
Can you elaborate this? I haven’t fully understand what is “incorporate the tag in the class from the start” . Thanks you.
> On 22 Nov 2016, at 15:33, MarLinn via Haskell-Cafe <haskell-cafe at haskell.org> wrote:
>>> 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.)
>> 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.
> I can see a potential problem because you can't hide instances. Once you define a Has-relationship, you can't cheaply change it. That could lead to conflicts, unless you hack around it with orphaned instances in a separate module. But you say you want to solve conflicts with tagging – so it would be reasonable to incorporate the tag in the class from the start. Which brings us back to fclabels I suppose.
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe