[Haskell-cafe] Eta-expansion destroys memoization?
haskell at benmachine.co.uk
Thu Oct 7 09:04:32 EDT 2010
On Thu, Oct 7, 2010 at 1:44 PM, Luke Palmer <lrpalmer at gmail.com> wrote:
> The section works because "(a %^&)" (for some operator %^&) is short
> for "(%^&) a" and "(%^& a)" is short for "flip (%^&) a". Sections
> don't expand into lambdas.
According to the report they do:
but GHC is different, I think:
I'm not sure if the significance of this difference is explored
anywhere, but notice that:
ghci> (() `undefined`) `seq` ()
*** Exception: Prelude.undefined
ghci> (`undefined` ()) `seq` ()
More information about the Haskell-Cafe