
7 Oct
2010
7 Oct
'10
9:04 a.m.
On Thu, Oct 7, 2010 at 1:44 PM, Luke Palmer
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: http://haskell.org/onlinereport/exps.html#sections http://haskell.org/onlinereport/haskell2010/haskellch3.html#x8-300003.5 but GHC is different, I think: http://www.haskell.org/ghc/docs/6.12.2/html/users_guide/syntax-extns.html#po... 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` () ()