<div dir="ltr"><div><br>I'm working on a GHC plugin, mainly in the form of a "builtin" rewrite rule, and I'm seeing a strange disappearance of a case alternative. With -ddump-rule-rewrites, I can see before & after the disappearance: Here's one rule firing with the alternative present:<br><br>    Rule fired<br>        Rule: reify<br>        Before: reifyP<br>                  TyArg Pair Int -> Int<br>                  ValArg \ (ds :: Pair Int) -><br>                           case ds of _ { :# a b -> $fNumInt_$c+ a b }<br>        After:  lamP<br>                  @ (Pair Int)<br>                  @ Int<br>                  "ds"#<br>                  (\ (ds :: EP (Pair Int)) -><br>                     reifyP<br>                       @ Int<br>                       (case evalP @ (Pair Int) ds of _ { :# a b -> $fNumInt_$c+ a b }))<br>        Cont:   StrictArg toE<br>                Stop[BoringCtxt] E Prim (Pair Int -> Int)<br><br>The next thing I see is the rule firing again on the residual reifyP application, but with the case alternative gone:<br><br>    Rule fired<br>        Rule: reify<br>        Before: reifyP<br>                  TyArg Int ValArg case evalP @ (Pair Int) ds of wild { }<br>        After:  ...<br><br>Any ideas what's causing the disappearance?<br><br></div>Thanks.  - Conal<br><div><br></div></div>