[GHC] #16050: Instance resolution error message unclear, because of missing kind information

GHC ghc-devs at haskell.org
Mon Dec 17 20:54:49 UTC 2018


#16050: Instance resolution error message unclear, because of missing kind
information
-------------------------------------+-------------------------------------
        Reporter:  chessai           |                Owner:  chessai
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.6.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13992, #14146    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by monoidal):

 This looks to be the same problem, but for equality:

 {{{
 #!haskell
 {-# LANGUAGE GADTs, TypeOperators, PolyKinds #-}

 import GHC.Types

 data a :~: b where Refl :: a :~: a

 foo :: TYPE a :~: TYPE b
 foo = Refl
 }}}

 gives an error message

 {{{
     • Couldn't match type ‘'LiftedRep’ with ‘'LiftedRep’
       ‘a’ is a rigid type variable bound by
         the type signature for:
           foo :: * :~: *
         at Repr.hs:7:1-24
       ‘b’ is a rigid type variable bound by
         the type signature for:
           foo :: * :~: *
         at Repr.hs:7:1-24
 }}}

 To see the problem, you need to use `-fprint-explicit-runtime-reps`. (I'm
 not sure if this should be a separate ticket.)

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


More information about the ghc-tickets mailing list