[GHC] #12249: Template Haskell top level scoping error

GHC ghc-devs at haskell.org
Thu Jun 30 12:53:01 UTC 2016


#12249: Template Haskell top level scoping error
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Template Haskell  |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 Perhaps the error message is regrettable, but otherwise, I like the
 original behavior. You say in your original example that `x` is not
 available for export or other use outside of the splices. But then why
 should `f1` or `f2` be? Is it only that they are unambiguous?

 What about

 {{{
 $([d| x = 5 |])
 y = x
 $([d| x = 7 |])
 }}}

 That's unambiguous. But surely confusing!

 Could you write a specification of your intended behavior?

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


More information about the ghc-tickets mailing list