haskell / haskell/error-messages
Parse erorr on input `->`
- Dominant language
- No language data
- Stars
- 76
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
From [stackoverflow](https://stackoverflow.com/questions/69122820):
```haskell
concat [[a]] -> [a]
concat xss = [x | xs <- xss, x <- xs]
```
Produces the error:
```
Test.hs:1:14: error: parse error on input ‘->’
|
1 | concat [[a]] -> [a]
| ^^
```
Which is not very descriptive. Perhaps GHC knows enough to be able to suggest adding `::`? Maybe the `->` token can be used to infer that the user probably meant to write a type signature?
Actually, I think this is very similar to #14 in the sense that the compiler starts parsing a top-level splice. But in this case the suggestion to use ` = ` is not right.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.