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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -