Haskell - parse error on input `|'
haskell
Solution
Be sure to indent the guards; Haskell has significant whitespace.
pow1 b e
| (e == 0) = 1
| otherwise = b * pow1 b (e-1)
Problem
``` pow1 b e | (e == 0) = 1 | otherwise = b * pow1 b (e-1) ``` I have exactly that code in a .hs file and when loading I always get the same parse error. I don't think it actually contains any mistakes - so my current thought is that the "|" sign isn't the one haskell wants, but it's the standard one on my Macbook Keyboard (using Mac OS). Is it possible, and if so how do I go around it? I'm currently using TextEdit to write the code, with the plain text setting on.