Inferred type is rejected
Consider
class C a where
op :: a -> ()
f x = op [x]
we get
Foo.hs:14:1: error:
Non type-variable argument in the constraint: C [t]
(Use FlexibleContexts to permit this)
When checking that ‘f’ has the inferred type
f :: forall t. C [t] => t -> ()
Arguably, if FlexibleContexts is not on, we should not infer a type that will immediately be rejected.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.10.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |