[Haskell-cafe] 1 = 0?

J. Waldmann waldmann at imn.htwk-leipzig.de
Tue Jun 17 10:53:45 UTC 2014


> Interesting. I just told GHC "let 5 = 3" and got no complaint. 

lazy pattern matching semantics, see:

ghci -XBangPatterns

Prelude> let {  0 = 1 } in 0
0

Prelude> let { ! 0 = 1 } in 0
*** Exception: <interactive>:3:7-13: Non-exhaustive patterns in pattern binding




More information about the Haskell-Cafe mailing list