Fix monoid instance for constraints so vars can have multiple types