#3057: Standalone deriving of Functor does not work for HsDoc
-----------------------------+----------------------------------------------
Reporter:  waern             |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Compiler        
 Version:  6.11              |       Severity:  normal          
Keywords:                    |       Testcase:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-----------------------------+----------------------------------------------
 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:
 {{{
 da...@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
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3057>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to