There's something very strange going on here. It looks, in those patterns, that we're pattern-matching on a type. This, of course, is not allowed, because types are erased. Upon further inspection, we're not really doing this. The first type parameter to Nil and Cons are inputs. Contrast to the second type parameter and the term parameters (to Cons), which are outputs.

Another way to see this is to think about how Nil @[] @a and Nil @Seq @a are both valid patterns, but Nil @l @Int would be terrible, as it requires doing a type check at runtime.

So I wonder if implementing this without terrible hacks might depend on PatternFamilies which (despite its name) allows for a mix of inputs and outputs in pattern synonyms.

Given our new ghc-proposals process, I think this should go via that route. The process seems to working well, and I know I have benefited through submitting my own proposals there and getting helpful feedback.