Fix parsing and pretty-printing of unboxed sums
-
Allow users to write the unboxed sum type constructors on their own, e.g.
(# | #)
and(# | | #)
. -
Fix the pretty-printing of unboxed sums: only use the special notation
(# a | b | c #)
for saturated unboxed sums; otherwise revert to prefix notation(# | | #) a b
. This also fixes the pretty-printing of the unboxed sumOccName
by adding spaces. This mirrors the term-level behaviour, where we need to write(# 1 | | #)
and can't write(# 1 || #)
or(#1||#)
.