Implement constraints for sum types