Fix the inlining bug: exprIsConApp_maybe didn't recognize constructor
applications inside notes.
I'm not sure if it's the right place to fix. Should notes be ignored
in other uses of collectArgs? Perhaps they should be ignored inside
the loop of collectArgs? And why the function marked as inline was
not inlined even though it's not a constructor application?
\begin{code}
exprIsConApp_maybe :: CoreExpr -> Maybe (DataCon, [CoreExpr])
-exprIsConApp_maybe expr
- = analyse (collectArgs expr)
+exprIsConApp_maybe (Note _ expr) = exprIsConApp_maybe expr
+exprIsConApp_maybe expr = analyse (collectArgs expr)
where
analyse (Var fun, args)
| Just con <- isDataConId_maybe fun,