Implement construction of sum types