Ticket #2188 (closed merge: fixed)

Opened 5 years ago

Last modified 5 years ago

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

Changed 5 years ago by simonpj

  • owner set to simonpj

I'm fixing this.

Simon

Changed 5 years ago by simonpj

  • owner changed from simonpj to igloo
  • type changed from bug to merge

Fixed by

Fri Apr  4 13:55:56 PDT 2008  simonpj@microsoft.com
  * Fix Trac #2188: scoping in TH declarations quotes

Simon

Changed 5 years ago by igloo

  • status changed from new to closed
  • resolution set to fixed

The 6.8 branch is already OK, so closing this bug.

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.