GHC-API unloading from external interpreter
Moritz Angermann
moritz at lichtzwerge.de
Fri Dec 15 06:04:02 UTC 2017
Hi,
I believe you are looking for the `Message` GADT in `GHCi.Message`
```
-- -----------------------------------------------------------------------------
-- The RPC protocol between GHC and the interactive server
-- | A @Message a@ is a message that returns a value of type @a at .
-- These are requests sent from GHC to the server.
data Message a where
```
maybe specifically the `UnloadObj` message.
Cheers,
Moritz
> On Dec 15, 2017, at 1:46 PM, Németh Boldizsár <nboldi at elte.hu> wrote:
>
> Dear GHC Developers,
>
> I'm using the GHC API to load Haskell modules and extract their syntax tree. I need to generate code where TH is used (by default I do in-memory linking). I've run into some trouble with external interpreter. When -fexternal-interpreter is NOT set, I use Linker.unload to remove bytecode from the global linker before reloading modules. However it is not applicable when external interpreter is used and I could not find corresponding functionality in the GHCi module (where communication with external interpreter is implemented).
>
> I've recently created 2 tickets related to this question: https://ghc.haskell.org/trac/ghc/ticket/14576, https://ghc.haskell.org/trac/ghc/ticket/14577
>
> Can someone help me with this problem?
>
> Best Regards,
> Boldizsár Németh
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
More information about the ghc-devs
mailing list