Inlining question

Adrian Hey ahey at
Thu Apr 15 13:40:51 EDT 2004

On Tuesday 13 Apr 2004 10:10 am, Adrian Hey wrote:
> Hello,
> Does inlining work with any function definitions (including those
> defined locally following a where.. say), or only with top level
> function definitions?

Well, as far as I can tell from my experiments, it does only work
for for top level definitions (or to be more precise, it seems not
to work with local definitions).

I assume it does work with top level definitions, so to get (what
would otherwise be) local definitions inlined I have to lambda lift
them manually to the top level?

The remark in the manual about inline pragmas occuring anywhere where
a type signature could occur would seem to confirm this (for Haskell
98 at least).

I'd be grateful if somebody who knows could confirm this (or not perhaps).
I don't want to uglify my code if it's not necessary :-(

Adrian Hey

More information about the Glasgow-haskell-users mailing list