Open andrewthad opened 8 years ago
The typeclass in that module should actually redefine rput, rget, etc. as well
That's a useful insight, thanks. I thought about unifying RElem
and UElem
, but my initial ideas were more complex than just smashing all methods together.
your lens machinery is identical to my optics
Well, similar, but not identical. You define ccast :: CoRec f sub -> CoRec f super
whereas I define usubset :: Prism' (Union f bs) (Union f as)
, which is strictly more powerful. vinyl
also defines rsubset
as a lens, not a simple projection.
Ah, I didn't realize there was a prism for corecord subset. Thanks for pointing that out.
This isn't really an issue, but @mckeankylej just pointed out to me that we inadvertently wrote the same library. In particular, your
Union
is identical to myCoRec
and your lens machinery is identical to my optics. (The typeclass in that module should actually redefine rput, rget, etc. as well, but it looks like I got lazy and forgot to add those).