Expose ghc-bin code as a library
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.
Trac metadata
Trac field | Value |
---|---|
Version | 7.8.3 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |