equality - equal sign with haskell literals -
what happens in ghci when load file line says: 0=1 ?
i expecting give error doesn't seem @ all. anything?
i assume it's equivalent in ghci saying "let 0=1". do?
the 0
in let
binding pattern match on literal 0
. wasn't sure going on @ first too, can confirm using strict pattern matching so:
prelude> :set -xbangpatterns prelude> let !0 = 1 in 0 *** exception: <interactive>:13:5-10: non-exhaustive patterns in pattern binding
Comments
Post a Comment