I'm learning haskell by going through learn you a haskell for great good and one of the functions in the tutorials doesn't seem to compile. I can't figure out why, I thought it might be the indenting but it doesn't seem to make a difference. Most of the SE questions seems to be referring to the ghci and trying to set variables.
describeList :: [a] -> String
describeList xs = "The list is " ++ case xs of [] -> "empty."
[x] -> "a singleton list."
xs -> "a longer list."
The error I get is:
describeList.hs:4:95: parse error on input '->'
Failed, modules loaded: none.