[GHC] #10466: Bogus multiple-declaration error in GHCi + Template Haskell

GHC ghc-devs at haskell.org
Sat May 30 21:37:43 UTC 2015


#10466: Bogus multiple-declaration error in GHCi + Template Haskell
-------------------------------------+-------------------------------------
              Reporter:  simonpj     |             Owner:
                  Type:  bug         |            Status:  new
              Priority:  normal      |         Milestone:
             Component:  Compiler    |           Version:  7.8.3
              Keywords:              |  Operating System:  Unknown/Multiple
          Architecture:              |   Type of failure:  None/Unknown
  Unknown/Multiple                   |        Blocked By:
             Test Case:              |   Related Tickets:
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
 Try this (with ghc 7.8.3)
 {{{
 th% ghc --version
 The Glorious Glasgow Haskell Compilation System, version 7.8.3
 th $ ghc --interactive -XTemplateHaskell
 GHCi, version 7.8.3: http://www.haskell.org/ghc/  :? for help
 Loading package ghc-prim ... linking ... done.
 Loading package integer-gmp ... linking ... done.
 Loading package base ... linking ... done.
 Prelude> let x = True
 Prelude> let y = [d| x = 'c' |]

 <interactive>:3:13:
     Multiple declarations of ‘x’
     Declared at: <interactive>:2:5
                  <interactive>:3:13
     In the Template Haskell quotation [d| x = 'c' |]
 }}}
 This is obviously wrong, a failure of the name-shadwing code in
 `RnNames.extendGlobalRdrEnvRn`.

 I suspect that this afflicts 7.10 too, but I can't check that right now.

 Working on a fix.

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


More information about the ghc-tickets mailing list