#6118: Kind variable falls out of scope in instance declaration
---------------------------------+------------------------------------------
    Reporter:  goldfire          |       Owner:                  
        Type:  bug               |      Status:  new             
    Priority:  normal            |   Milestone:                  
   Component:  Compiler          |     Version:  7.5             
    Keywords:  PolyKinds         |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------
Changes (by simonpj):

  * difficulty:  => Unknown


Comment:

 I'm on this.  When fixed I get this message for the `Maybe` instance:
 {{{
 T6118.hs:20:3:
     Variable occurs more often than in instance head
       in the type family application: Demote k (Any k)
     (Use -XUndecidableInstances to permit this)
 }}}
 This is because of the
 [http://www.haskell.org/ghc/docs/latest/html/users_guide/type-
 families.html#type-family-decidability conservative termination-checking
 rules for type functions].  These rules could perhaps be loosened a bit to
 account for kind polymorphism, but I'm not quite sure ''how'' they should
 be loosened.

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

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

Reply via email to