[GHC] #8913: either bug or confusing error message mixing PolyKinds and TypeFamilies

GHC ghc-devs at haskell.org
Mon Mar 24 10:26:46 UTC 2014


#8913: either bug or confusing error message mixing PolyKinds and TypeFamilies
-------------------------------------+-------------------------------------
        Reporter:  ghorn             |            Owner:
            Type:  bug               |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  Compiler (Type    |          Version:  7.8.1-rc2
  checker)                           |         Keywords:  PolyKinds,
      Resolution:                    |  TypeFamilies
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+-------------------------------------

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

 In [changeset:"6ae678e31a5fdd3b0bd1f8613fe164012bb630f4/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="6ae678e31a5fdd3b0bd1f8613fe164012bb630f4"
 Flattener preserves synonyms, rewriteEvidence can drop buggy
 "optimisation"

 There was a special case in rewriteEvidence, looking like:
   = return (Just (if ctEvPred old_ev `tcEqType` new_pred
                   then old_ev
                   else old_ev { ctev_pred = new_pred }))

 But this was wrong: old_pred and new_pred might differ in the kind
 of a TyVar occurrence, in which case tcEqType would not notice,
 but we really, really want new_pred.  This caused Trac #8913.

 I solved this by dropping the whole test, and instead making
 the flattener preserve type synonyms. This was easy because
 TcEvidence has TcTyConAppCo which (unlike) Coercion, handles
 synonyms.
 }}}

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


More information about the ghc-tickets mailing list