[GHC] #8831: Cannot use Template Haskell splice in ghci

GHC ghc-devs at haskell.org
Sun Mar 23 18:49:34 UTC 2014


#8831: Cannot use Template Haskell splice in ghci
-------------------------------------+----------------------------------
        Reporter:  goldfire          |            Owner:  thoughtpolice
            Type:  bug               |           Status:  new
        Priority:  highest           |        Milestone:  7.8.1
       Component:  Template Haskell  |          Version:  7.8.1-rc2
      Resolution:                    |         Keywords:
Operating System:  MacOS X           |     Architecture:  x86_64 (amd64)
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+----------------------------------

Comment (by Simon Peyton Jones <simonpj@…>):

 In [changeset:"28e8d878b63d06824001ac3a631254679e0f1960/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="28e8d878b63d06824001ac3a631254679e0f1960"
 Simplify handling of the interactive package; fixes Trac #8831

 This patch is really a fix to the big commint
    73c08ab10e4077e18e459a1325996bff110360c3
    Re-work the naming story for the GHCi prompt (Trac #8649)
 which introduced the 'interactive' package
 See Note [The interactive package] in HscTypes

 The original commit set both
   (a) The tcg_mod field of TcGblEnv to 'interactive:Ghci4' (say)
   (b) The thisPackage field of DynFlags to 'interactive'

 But the second step interacts badly with linking.  :loaded modules are
 in the package set by 'thisPackage' (usually 'main'); if you change
 that, then we try to link package 'main', but can't find it, and
 that is what happened in #8831.

 The fix was simple: do (a) but not (b).

 I changed Note [The interactive package] in HscTypes to describe this.
 }}}

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


More information about the ghc-tickets mailing list