[GHC] #11282: Injectivity annotation fails in the presence of higher-rank use of constraint family

GHC ghc-devs at haskell.org
Thu Dec 24 04:16:15 UTC 2015


#11282: Injectivity annotation fails in the presence of higher-rank use of
constraint family
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.11
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 Actually, this has nothing to do with injective type families. If I change
 the code to

 {{{
 meth :: (G a => a) -> ()
 }}}

 I get an error. That error explains that `a` is untouchable, which makes
 some small degree of sense, given that `G a` might reduce to an equality
 constraint.

 But the original error message is quite unfortunate, because `F` is indeed
 injective!

 So this bug is really about the error message, not the rejection.

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


More information about the ghc-tickets mailing list