haskell / haskell/error-messages

"Data Constructor not in Scope" when defining an operator function starting with `:`

Open
#529 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
76
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Defining a function starting with `:` is invalid according to the parsing rules:

```hs
f :< g = f . g
```

However, the error message here could see some improvement. It currently shows:

> error: Not in scope: data constructor ‘:<’

Perhaps it should instead explicitly note that only data constructors may start with colons, and function names must not.

> error: Function name may not start with a colon (':')

Or:

> error: Only data constructor names may start with a colon (':')

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.