[GHC] #9743: Expose ghc-bin code as a library

GHC ghc-devs at haskell.org
Thu Oct 30 16:44:23 UTC 2014


#9743: Expose ghc-bin code as a library
-------------------------------------+-------------------------------------
       Reporter:  luite              |                   Owner:
           Type:  feature request    |                  Status:  new
       Priority:  normal             |               Milestone:  7.10.1
      Component:  Compiler           |                 Version:  7.8.3
       Keywords:                     |        Operating System:
   Architecture:  Unknown/Multiple   |  Unknown/Multiple
     Difficulty:  Unknown            |         Type of failure:
     Blocked By:                     |  None/Unknown
Related Tickets:                     |               Test Case:
                                     |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
 We have a few projects, most notably `ghci-ng`, `ghc-mod` and `GHCJS`
 using significant parts of the GHC front end, doing so by copying the code
 into their own trees.

 While the code hasn't been written with use as a library in mind, exposing
 it can significantly reduce the amount of code to be copied by these
 projects, in particular if they want to support multiple GHC versions.

 We could either expose `ghc-bin` directly as a package, adding all modules
 as `exposed-modules`, or add the modules to the `ghc` package. As far as I
 could see, `ghc-bin` does not have any dependencies that `ghc` does not
 already have, so I don't have any strong preference for either.

 We can use the current version as a starting point and adapt it for the
 projects using it as needed. I'd submit a few small changes to `Main.hs`
 that'd let GHCJS use much more of it.

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


More information about the ghc-tickets mailing list