[GHC] #9858: Typeable instances should be kind-aware

GHC ghc-devs at haskell.org
Tue Apr 14 14:40:20 UTC 2015


#9858: Typeable instances should be kind-aware
-------------------------------------+-------------------------------------
        Reporter:  dreixel           |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  highest           |               Milestone:  7.10.2
       Component:  Compiler          |                 Version:  7.9
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:  Phab:D652
-------------------------------------+-------------------------------------

Comment (by Simon Peyton Jones <simonpj@…>):

 In [changeset:"7b042d5adabdb0fc06286db1a7f9cbf1e9fd1fbf/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="7b042d5adabdb0fc06286db1a7f9cbf1e9fd1fbf"
 Do not allow Typeable on constraints (Trac #9858)

 The astonishingly-ingenious trio of
 Shachaf Ben-Kiki, Ørjan Johansen and Nathan van Doorn
 managed to persuade GHC 7.10.1 to cough up unsafeCoerce.

 That is very bad. This patch fixes it by no allowing Typable
 on Constraint-kinded things.  And that seems right, since
 it is, in effect, a form of impredicative polymorphism,
 which Typeable definitely doesn't support.

 We may want to creep back in the direction of allowing
 Typeable on constraints one day, but this is a good
 fix for now, and closes a terrible hole.
 }}}

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


More information about the ghc-tickets mailing list