New INLINE pragma syntax idea, and some questions

Bas van Dijk v.dijk.bas at
Tue Aug 7 13:29:48 CEST 2012

On 4 August 2012 15:53, Brandon Simmons <brandon.m.simmons at> wrote:
> The only thing that bothers me about this foldl is the presence of z0 xs0, which I think
> are only there on the LHS to indicate to GHC where it should inline.

Are these really needed?

Since GHC only inlines functions which are "fully applied" (where
according to [1] "fully applied" means applied to as many arguments as
appear (syntactically) on the LHS of the function definition)  I think
it's more desirable to remove these arguments (or at least the xs0)
since then the function is more likely to be inlined in cases such as:

sum = foldl (+) 0


More information about the Glasgow-haskell-users mailing list