
28 Sep
2016
28 Sep
'16
8 a.m.
There is some subtle, but reasonable difference between \pat1 pat2 -> expr and \pat1 -> \pat2 -> expr:
seq ((\True y -> "DEFINED") undefined) 42 42 seq ((\True -> \y -> "DEFINED") undefined) 42 *** Exception: Prelude.undefined
The reason is the translation from Haskell Report 2010 (3.3) \ p1 . . . pn -> e = \ x1 . . . xn -> case (x1 , . . . , xn ) of (p1 , . . . , pn ) -> e Today I found (GHC 8.0.1) that
seq ((\True -> \y -> undefined) undefined) 42 42
Is the last result correct? -- Denis Moskvin