[GHC] #14010: UndecidableSuperClasses - Could not deduce (Category d)

GHC ghc-devs at haskell.org
Mon Jul 24 17:48:12 UTC 2017


#14010: UndecidableSuperClasses - Could not deduce (Category d)
-------------------------------------+-------------------------------------
        Reporter:  int-index         |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
                                     |  UndecidableSuperClasses
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by int-index):

 To clarify, you say that given

 {{{
 [G] Functor @(c,d) @* (f2 :: (c,d) -> *)
 }}}

 we have its superclasses:

 {{{
 [G] Category (c,d)
 [G] Category *
 }}}

 and you claim we can't prove `[W] Category d` from this. But with the
 definition of `Functor` that does compile, the superclasses are:

 {{{
 [G] Category ((c,d), *)
 }}}

 and GHC will want to extract `[W] Category (d, *)` from it. So GHC appears
 to do more work here!

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


More information about the ghc-tickets mailing list