[GHC] #15515: Bogus "No instance" error when type families appear in kinds

GHC ghc-devs at haskell.org
Sun Sep 2 21:16:03 UTC 2018


#15515: Bogus "No instance" error when type families appear in kinds
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:  8.8.1
       Component:  Compiler (Type    |              Version:  8.4.3
  checker)                           |             Keywords:  TypeInType,
      Resolution:                    |  TypeFamilies
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Poor/confusing    |  Unknown/Multiple
  error message                      |            Test Case:
      Blocked By:  12564             |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D5068
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Krzysztof Gogolewski <krz.gogolewski@…>):

 In [changeset:"6dea7c161e458ddb3ea4afd366887c8d963c6585/ghc" 6dea7c1/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="6dea7c161e458ddb3ea4afd366887c8d963c6585"
 Reject class instances with type families in kinds

 Summary:
 GHC doesn't know how to handle type families that appear in
 class instances. Unfortunately, GHC didn't reject instances where
 type families appear in //kinds//, leading to #15515. This is easily
 rectified by calling `checkValidTypePat` on all arguments to a class
 in an instance (and not just the type arguments).

 Test Plan: make test TEST=T15515

 Reviewers: bgamari, goldfire, simonpj

 Reviewed By: simonpj

 Subscribers: simonpj, rwbarton, carter

 GHC Trac Issues: #15515

 Differential Revision: https://phabricator.haskell.org/D5068
 }}}

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


More information about the ghc-tickets mailing list