[GHC] #6054: Couldn't match kind `BOX' against `*' when using SOURCE import

GHC cvs-ghc at haskell.org
Fri Apr 27 16:08:55 CEST 2012


#6054: Couldn't match kind `BOX' against `*' when using SOURCE import
------------------------------+---------------------------------------------
 Reporter:  atnnn             |          Owner:                  
     Type:  bug               |         Status:  new             
 Priority:  normal            |      Component:  Compiler        
  Version:  7.4.1             |       Keywords:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
  Failure:  None/Unknown      |       Testcase:                  
Blockedby:                    |       Blocking:                  
  Related:                    |  
------------------------------+---------------------------------------------
 When this module has a (useless) SOURCE import, using its typeclass gives
 an error.

 {{{
 module Bar where
 import {-# SOURCE #-} Foo
 class Bar a (p :: Bool) | a -> p
 data Proxy a = Proxy
 }}}

 With the interpreter, the error appears when using the class:

 {{{
 Prelude> :l Bar
 *Bar> :set -XFlexibleContexts -XDataKinds
 *Bar> Proxy :: Bar '() a => Proxy a
     Couldn't match kind `BOX' against `*'
     Kind incompatibility when matching types:
       k0 :: BOX
       Bool :: *
 }}}

 When compiling, the error appears the *second* run.

 {{{
 $ ghc Main.hs
 No instance for (Bar () '() a0)
 $ ghc Main.hs
 Couldn't match kind `BOX' against `*'
 }}}

 Tested with 7.4.1 and HEAD

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6054>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list