| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
GHC.Driver.ByteCode
Synopsis
- outputAndCompileForeign :: HscEnv -> Module -> ModLocation -> [(ForeignSrcLang, FilePath)] -> ForeignStubs -> IO [FilePath]
- compile_for_interpreter :: HscEnv -> (HscEnv -> IO a) -> IO a
Documentation
outputAndCompileForeign :: HscEnv -> Module -> ModLocation -> [(ForeignSrcLang, FilePath)] -> ForeignStubs -> IO [FilePath] Source #
Write foreign sources and foreign stubs to temporary files and compile them.
compile_for_interpreter :: HscEnv -> (HscEnv -> IO a) -> IO a Source #
Modify flags such that objects are compiled for the interpreter's way.
This is necessary when building foreign objects for Template Haskell, since
those are object code built outside of the pipeline, which means they aren't
subject to the mechanism in enableCodeGenWhen that requests dynamic build
outputs for dependencies when the interpreter used for TH is dynamic but the
main outputs aren't.
Furthermore, the HPT only stores one set of objects with different names for
bytecode linking in HomeModLinkable, so the usual hack for switching
between ways in get_link_deps doesn't work.