
7 Aug
2012
7 Aug
'12
11:29 a.m.
On 4 August 2012 15:53, Brandon Simmons
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 [1] http://www.haskell.org/ghc/docs/latest/html/users_guide/pragmas.html#inline-...