Ticket #2188 (closed merge: fixed)
TH scoping problem
| Reported by: | igloo | Owned by: | igloo |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.10 branch |
| Component: | Template Haskell | Version: | 6.9 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | TH_scope | Blocked By: | |
| Blocking: | Related Tickets: |
Description
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.
Change History
Note: See
TracTickets for help on using
tickets.
