Error cascade with type applications
Using type applications with an out of scope identifier causes an unfortunate error cascade.
foo = notInScope @Bool
Leads to the right out of scope error but also an error about using type application when notInScope
is
not a polytype. I think the second error should be suppressed.
t.hs:4:7: error: Variable not in scope: notInScope
|
4 | foo = notInScope @Bool
| ^^^^^^^^^^
t.hs:4:7: error:
• Cannot apply expression of type ‘t1’
to a visible type argument ‘Bool’ notInScope
• In the expression: notInScope @Bool
In an equation for ‘foo’: foo = notInScope @Bool
|
4 | foo = notInScope @Bool
| ^^^^^^^^^^^^^^^^
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |