Closed LiamGoodacre closed 6 years ago
Do you want to add a UnionNub
kind of thing for properly typing merge
? (as in RowUnion.purs, which should be left-biased unique but only has a Union
constraint which creates duplicates)
Here's a naïve implementation (left-biased):
class UnionNub
(a :: # Type)
(b :: # Type)
(c :: # Type)
| -> a b c
instance unionNub ::
( Union a b r
, RowToList r rl
, ListToRow rl r
, RowListNub rl cl
, ListToRow cl c
) => UnionNub a b c
I could probably draft up intersection and difference too.
Could this go in sometime so I can depend on it? 😄 I need to use the RowAppend class the most
I'm happy to merge this whenever @LiamGoodacre says it's good to go.
Sorry, I completely forgot about this.
I'll merge once Travis is happy.
@paf31 do you want to make a v2.4.1 for this?
Building up a collection of RowList operations. PR for discussion.