Order of declarations affects the correctness of reported error.
In the following code
f :: A -> A
f
data A = A
leads to an out of scope error for 'A', whereas
data A = A
f :: A -> A
f
correctly claims that 'f' lacks an accompanying binding, and
data A = A
f :: A -> A
f = id
f
produces that error that `f'
is used in a top-level splice or annotation,
and must be imported, not defined locally.
Finally,
g = f
h
f = id
Gives an out of scope error for 'f', not 'h'
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.12.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Parser) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |