visual-studiohaskellparse-error

Why does Haskell give me this parse error on input '->'?


I have looked through stackoverflow trying to figure this out, since I see alot of questions titled the same as mine. But I get this parse error in a Haskell file which worked perfectly the last time I opened it. I get this error-message enter image description here


Solution

  • One defines a signature for a function by writing the name of the function, then two consecutive colons (::), and then the signature. You forgot the double colon, you thus write the signature of your concat function with:

    --     ↓↓ double colon
    concat :: [[a]] -> [a]