Derived functor instance for void types handles errors badly
If we have
data V a deriving (Functor)
and we evaluate
f <$> (error "Boo!" :: Void)
we should really get a "Boo" error, rather than a useless "Void fmap" one. The offending code is in compiler/typecheck/TcGenFunctor.hs.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.0.1 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |