#2188: TH scoping problem
---------------------------------+------------------------------------------
    Reporter:  igloo             |       Owner:             
        Type:  bug               |      Status:  new        
    Priority:  normal            |   Milestone:  6.10 branch
   Component:  Template Haskell  |     Version:  6.9        
    Severity:  normal            |    Keywords:             
  Difficulty:  Unknown           |    Testcase:  TH_scope   
Architecture:  Unknown           |          Os:  Unknown    
---------------------------------+------------------------------------------
 In the HEAD, these modules:
 {{{
 module TH_scope where

 import TH_scope_helper

 x :: ()
 x = ()
     where hold = $( wibble [d| hold :: ()
                                hold = () |] )
 }}}
 {{{
 module TH_scope_helper where

 import Language.Haskell.TH

 wibble :: Q [Dec] -> Q Exp
 wibble _ = [| 'a' |]
 }}}
 give:
 {{{
 TH_scope.hs:8:31:
     Misplaced type signature: hold :: ()
     The type signature must be given where `hold' is declared
 }}}
 Renaming the outer `hold` fixes it.

 The 6.8 branch seems OK.

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