simplify type rules for sum comprehensions