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

GHC ghc-devs at haskell.org
Tue May 23 22:22:27 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 simonpj):

 You should ask users not me!  But looking at
 {{{
   Extend :: ExtensionType ext a -> Test ext a
 }}}
 a user might say that `ExtentionType ext a` ''does'' use `a` as the last
 arg of a saturated type-family application, namely `ExtensionType ext a`!

 An what is "the last type variable"?

 Guessing wildly, what about
 {{{
 Illegal use of type variable 'a' in the first argument of `Extend`.
 Such uses must be of form `ty a` where `ty` is a data type or
 saturated type family application.
 }}}
 I'm not sure if that's better...

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


More information about the ghc-tickets mailing list