Quantcast

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

classic Classic list List threaded Threaded
3 messages Options
GHC
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

GHC
#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

_______________________________________________
Glasgow-haskell-bugs mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
GHC
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

GHC
#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:                    |  
------------------------------+---------------------------------------------

Comment(by simonpj@…):

 commit e57c8667363a60164b3505f22ddd25a9d5be32f5
 {{{
 Author: Simon Peyton Jones <[hidden email]>
 Date:   Mon Apr 30 13:40:23 2012 +0100

     Make the interface-file deserialisation work right for promoted types
 (Trac #6054)

     GHC currently uses the slightly-dodgy plan that when we proote
     a TyCon to be a Kind constructor we leave it with the same Name.

     That means that to make sense of a IfaceType we need to know wheter
     it is really an IfaceType or an IfaceKind, because in the latter an
     occurrence of (say) Maybe will be the *promoted* Maybe.

     See Note [Checking IfaceTypes vs IfaceKinds] in TcIface

  compiler/iface/TcIface.lhs |   73
 +++++++++++++++++++++++++++++++++++++++----
  1 files changed, 66 insertions(+), 7 deletions(-)
 }}}

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
GHC
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

GHC
In reply to this post by GHC
#6054: Couldn't match kind `BOX' against `*' when using SOURCE import
-------------------------------+--------------------------------------------
  Reporter:  atnnn             |          Owner:                  
      Type:  bug               |         Status:  closed          
  Priority:  normal            |      Milestone:                  
 Component:  Compiler          |        Version:  7.4.1          
Resolution:  fixed             |       Keywords:                  
        Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown      |     Difficulty:  Unknown        
  Testcase:  polykinds/T6054   |      Blockedby:                  
  Blocking:                    |        Related:                  
-------------------------------+--------------------------------------------
Changes (by simonpj):

  * status:  new => closed
  * difficulty:  => Unknown
  * resolution:  => fixed
  * testcase:  => polykinds/T6054


Comment:

 Thanks for identifying this!

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Loading...