Sorry for probably a noob question.
I'm getting this:
Prelude> all (\x -> x==1) ([n | n <- [1..20]])
False
Prelude> all (\x -> x == 1) ([n | n <- [1..20]])
<interactive>:17:44:
parse error (possibly incorrect indentation or mismatched brackets)
Prelude>
I.e. x==1
works, but if I change this to x == 1
it doesn't. But why is that? E.g. 1 == 1
seem to work fine.
Compiler Version:
$ ghci --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3
Added screenshot for proof; it's hard to see but you can see the input line doesn't contain anything weird.
It turns out this behaviour only occurs in Sublime Haskell REPL plugin. I've filed a ticket for this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With