[GHC] #13731: DeriveFunctor and friends don't understand type families

GHC ghc-devs at haskell.org
Tue May 23 22:10:45 UTC 2017


#13731: DeriveFunctor and friends don't understand type families
-------------------------------------+-------------------------------------
        Reporter:  spacekitteh       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1-rc2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 Replying to [comment:7 simonpj]:
 > Yes, it's saturated in the field, but the use of `fmap` requires us to
 decompose the type application, we it must be decomposable.  It's only
 decomposable if `ExtensionType` has arity 1.

 Thank you, this is the part that I wasn't understanding.

 So would you be happy with this error message?

 {{{
     • Can't make a derived instance of ‘Functor (Test ListExtension)’:
         Constructor ‘Extend’ must use the last type variable only as
         the last argument of a data type or a saturated type family
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13731#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list