Currently, the only way that Union is exposed is through group. However, group can only fiddle with white space. There are cases where this is not good enough. For instance, pretty printing a Haskell case statement:
case e of C1 x -> e1 ; C2 x y -> e2 ; ...
vs.
case e of
C1 x -> e1
C2 x y -> e2
...
Line breaks must turn into semicolons when trying to lay out on a single line.
A union combinator might allow people to break the invariant, but I'm not sure how to better handle arbitrary new functionality of this type, and it'd be nice to have.
Currently, the only way that Union is exposed is through group. However, group can only fiddle with white space. There are cases where this is not good enough. For instance, pretty printing a Haskell case statement:
vs.
Line breaks must turn into semicolons when trying to lay out on a single line.
A union combinator might allow people to break the invariant, but I'm not sure how to better handle arbitrary new functionality of this type, and it'd be nice to have.