Programming with union, intersection, and negation types