Unexpected lack of optimisation

ajb at spamcop.net ajb at spamcop.net
Tue Apr 29 20:33:57 EDT 2008

G'day all.

This is just a suggestion, but perhaps the problem isn't that retry isn't
inlined, it's that it isn't specialised.

IIRC, GHC does now specialise functions under what I assume would be these

     - There is a top-level case expression (possibly under some lets)
       which tests a function argument.

     - That function argument has a known constructor at a call site.

The situation in Neil's code is almost identical, except that the
top-level case expression is on a value passed by environment, not by
function argument.

Andrew Bromage

More information about the Glasgow-haskell-users mailing list