#5530: TyVarBndr inside type quotations don't have kinds ascribed
---------------------------------+------------------------------------------
    Reporter:  nfrisby           |       Owner:                  
        Type:  feature request   |      Status:  new             
    Priority:  normal            |   Component:  Template Haskell
     Version:  7.0.3             |    Keywords:                  
    Testcase:                    |   Blockedby:                  
          Os:  Unknown/Multiple  |    Blocking:                  
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
---------------------------------+------------------------------------------
 The top-level splice

 {{{
   [t| Functor f => f a |] >>= \ty -> report False (show ty) >> return []
 }}}
 gives (I cleaned up the names)

 {{{
   ForallT [PlainTV f,PlainTV a] [ClassP Functor [VarT f]] (AppT (VarT f)
 (VarT a))
 }}}

 Notice the `PlainTV f` bit, which suggests `f :: *`. I can't find the
 documentation on `PlainTV`, but I suspect it isn't actually specified such
 that the resulting type variable is `*`.

 This does seem like inconsistent behavior out of GHC, however: it usually
 provides `KindedTV` where it can. Since GHC catches kind errors inside
 `[t|...|]`, it seems it ought to be able to generate `KindedTV` where
 possible.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5530>
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