purescript / purescript-typelevel-prelude

Types and kinds for basic type-level programming
BSD 3-Clause "New" or "Revised" License
63 stars 21 forks source link

RowListIntersection? #31

Open justinwoo opened 6 years ago

justinwoo commented 6 years ago

Small utility I wrote for some demos that I think could maybe be useful for others, like when you want to figure out what fields are unique from another row that isn't a subtype.

Should I PR this? Are there some problems I've missed here? https://github.com/justinwoo/record-diff/blob/f326d8d1655b8d4ebb67c8f794a5b627e71539f6/src/Main.purs#L18

LiamGoodacre commented 6 years ago

This implicitly depends on a sorted RowList, and seems to expect no duplicate keys. So I would be hesitant to call it RowListIntersection. But it sounds interesting.

justinwoo commented 6 years ago

Definitely needs a name with less false promises :smile: