Standalone deriving of Functor does not work for HsDoc
I tried to use the new DerivingFunctor extension to derive Functor for the HsDoc type from the ghc package:
{-# StandaloneDeriving, DerivingFunctor #-}
import HsDoc
deriving instance Functor HsDoc
But I got this error message:
david@david-laptop:~/dev/test$ /home/david/ghc-head/bin/ghc --make Test.hs -package ghc
[1 of 1] Compiling Test ( Test.hs, Test.o )
Test.hs:9:0:
Couldn't match expected type `b' against inferred type `a'
`b' is a rigid type variable bound by
the type signature for `fmap' at <no location info>
`a' is a rigid type variable bound by
the type signature for `fmap' at <no location info>
Expected type: HsDoc b
Inferred type: HsDoc a
In the first argument of `DocAppend', namely `a1'
In the expression: DocAppend a1 a2
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.11 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |