#7410: Type error says that tuple components have kind (* -> *)
----------------------------------------------+-----------------------------
Reporter:  benl                               |          Owner:                 
        
    Type:  bug                                |         Status:  new            
        
Priority:  normal                             |      Component:  Compiler (Type 
checker)
 Version:  7.6.1                              |       Keywords:                 
        
      Os:  Unknown/Multiple                   |   Architecture:  
Unknown/Multiple       
 Failure:  Incorrect warning at compile-time  |      Blockedby:                 
        
Blocking:                                     |        Related:                 
        
----------------------------------------------+-----------------------------
 {{{
 Prelude Data.Map> :kind (,)
 (,) :: * -> * -> *
 }}}

 The following type error says that the second argument to `(,)` should
 have kind `* -> *`, which isn't true.

 {{{
 Prelude> :m +Data.Map
 Prelude Data.Map> :kind (Map Int, Int)
 <interactive>:1:11:
     The second argument of a tuple should have kind `* -> *',
       but `Int' has kind `*'
     In a type in a GHCi command: (Map Int, Int)
 }}}

 Now it can't make up its mind:

 {{{
 Prelude Data.Map> :kind (Int, Map Int)
 <interactive>:1:7:
     Expecting one more argument to `Map Int'
     The second argument of a tuple should have kind `*',
       but `Map Int' has kind `* -> *'
     In a type in a GHCi command: (Int, Map Int)
 }}}

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

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to