A general API for relational joins
haskellforall.com
haskellforall.com
The fact that these are sets is an important distinction and enables things like predicate pushdown and other important optimizations. Would be interesting to see a Selinger-style cost-based optimizer built in Haskell!