I was doing an exercize from the Haskellwiki (99 questions) and I am getting "exercize.hs:1:12: parse error on input ‘->’ ":
myLast [a] -> a
myLast [] = error "Empty list has no last element"
myLast [x] = x
myLast (_:xs) = myLast xs
I am using Notepad++ on a Win8.1, the compiler is GHCi. I rewrote it many times and I can't see a mistake. Why is this happening?