Constant functions and selectors make for interesting arguments

David Feuer david.feuer at gmail.com
Fri Jan 27 16:42:16 UTC 2017


GHC's inliner has a notion of "interesting argument" it uses to encourage
inlining of functions called with (I think) dictionary arguments. I think
another class of argument is very interesting, by being very boring. Any
argument that looks like either

\ _ ... (Con _ ... x ... _ ) ... _ -> coerce x

or

\ _ ... _ -> k

Has a pretty good chance of doing a lot of good when inlined, perhaps
plugging a space leak. Would it make sense to try to identify such
functions and consider them interesting for inlining?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20170127/18cd1cc4/attachment.html>


More information about the ghc-devs mailing list