Haskell is a good start. But it's type system can't even express sets.
HList? http://hackage.haskell.org/package/HList
http://hackage.haskell.org/packages/archive/HList/0.2.3/doc/... checks for element occurencies. Records has HasLabel predicate. You can find more examples like that there.
Does HList take O(n) to check if an element is a duplicate?
http://en.wikibooks.org/wiki/Haskell/Category_theory