[commit: ghc] wip/T9732: Generate two versions of pattern synonym matcher: * one where the continuation is lifted, * one where the continuation is unlifted. (423e9b2)
| $m?P :: forall (r :: ?) a. [T a] -> R(r) -> R(r) -> r
| where R(r) = Void# -> r if r :: #
| , r otherwise
| Is there a way to do that?
| Now, to cut down on the amount of code generated, I guess we could
| $m?P :: forall (r :: ?) a. [T a] -> (Void# -> r) -> (Void# -> r) -> r
| and always compile pattern synonym match continuations into lambdas
| over this dummy Void#, but I thought we also wanted to avoid that...
I think that's fine. These matchers will usually be inlined and all the clutter will go away.
| Note that if P were to have arguments, the same problem would still be
| present with the fail continuation (but not the success one).