<div dir="ltr"><div>There is some subtle, but reasonable difference between \pat1 pat2 -> expr and \pat1 -> \pat2 -> expr:</div><div><br></div><div><div>> seq ((\True y -> "DEFINED") undefined) 42</div><div>42</div><div>> seq ((\True -> \y -> "DEFINED") undefined) 42</div><div>*** Exception: Prelude.undefined</div></div><div><br></div><div>The reason is the translation from Haskell Report 2010 (3.3)</div><div>\ p1 . . . pn -> e = \ x1 . . . xn -> case (x1 , . . . , xn ) of (p1 , . . . , pn ) -> e<br></div><div><br></div><div><br></div><div>Today I found (GHC 8.0.1) that</div><div><br></div><div>> seq ((\True -> \y -> undefined) undefined) 42<br></div><div>42</div><div><br></div><div>Is the last result correct?</div><div><br></div>-- <br><div class="gmail_signature">Denis Moskvin</div>
</div>