Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can the external core be fed back into GHC? #9

Open
chrisdone opened this issue Oct 16, 2021 · 3 comments
Open

Can the external core be fed back into GHC? #9

chrisdone opened this issue Oct 16, 2021 · 3 comments

Comments

@chrisdone
Copy link

chrisdone commented Oct 16, 2021

One thing people sometimes want is to generate files of GHC’s bytecode. That can make for faster recompilation and even a way to build an “interpreted” exe, both of these could yield much faster dev cycles when the project is large and build times are more painful than runtime. On a project with 1000 modules and lots of TH, that recompiling of bytecode can hurt.

I’m wondering whether one could generate external STG when in GHC’s Interpreted linker mode.

Your external-stg looks like it goes in both directions: stg -> external stg and back. Are there any pitfalls/caveats to its current implementation?

I’m aware that its speed won’t be good because it’s using the binary package, but that’s easily swapped out for something more efficient.

@chrisdone
Copy link
Author

@csabahruska
Copy link
Member

csabahruska commented Oct 16, 2021

Yes, the external-stg-compiler can feed back ext-stg to ghc for codegen.
The latest code is available on github.
The pipeline does not use the bytecode at all.

@csabahruska
Copy link
Member

csabahruska commented Oct 16, 2021

GHC-WPC does not support external core, only ext-stg.
The Core IR is always in flux, that's why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants