compilation of pattern-matching?

Simon Peyton-Jones simonpj at
Wed Mar 25 07:03:47 EDT 2009

| You could imagine a pragma to say which branch is likely.
| f p1 = e1
| f p2 = {-# LIKELY #-} e2
| f p3 = e3
| Is there some way to propagate pragmas through core transformations?

Not robustly.  We do have "Notes" attached to core, which are more or less propagated though, but I make not promises.  It's quite unclear how to make all optimsations treat annotations in the "right" way.


More information about the Glasgow-haskell-users mailing list