Just a small comment about syntax.
Why is there an "_n" suffix on the type constructor? Isn't it syntactically evident how many things are in the |# .. | .. #| block?
More generally, are the parser changes and the wild new syntax strictly necessary?
Could we instead just have a new keyword, but have at look like a normal type constructor? For example, the type:
(Sum# T1 T2 T3)
Where "UnboxedSum" can't be partially applied, and is variable arity. Likewise, "MkSum#" could be a keyword/syntactic-form:
(MkSum# 1 3 expr)
case x of MkSum# 1 3 v -> e
Here "1" and "3" are part of the syntactic form, not expressions. But it can probably be handled after parsing and doesn't require the "_n_m" business.
-Ryan
After some discussions with SPJ I've now rewritten the proposal in terms of unboxed sums (which should suffer from the extra seq problem you mention above).