[GHC] #10760: Conflicting typefamily instances not reported with polykinds

GHC ghc-devs at haskell.org
Sat Aug 8 17:00:10 UTC 2015


#10760: Conflicting typefamily instances not reported with polykinds
-------------------------------------+-------------------------------------
              Reporter:  steely      |             Owner:
                  Type:  bug         |            Status:  new
              Priority:  normal      |         Milestone:
             Component:  Compiler    |           Version:  7.8.3
              Keywords:              |  Operating System:  Unknown/Multiple
          Architecture:              |   Type of failure:  GHC accepts
  Unknown/Multiple                   |  invalid program
             Test Case:              |        Blocked By:
              Blocking:              |   Related Tickets:
Differential Revisions:              |
-------------------------------------+-------------------------------------
 GHC fails to report conflicting instances for a open polykinded type
 family when
 the two resulting types have different kinds.
 I would expect conflicts to be detected regardless of the concrete kind of
 the result.

 Minimal Example:

 {{{#!hs
 type family Bar a :: k

 type instance Bar Int = Int
 --type instance Bar Int = Bool -- Conflict detected
 type instance Bar Int = [] -- Conflict NOT detected
 }}}

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


More information about the ghc-tickets mailing list