Skip to content

Use object files for Template Haskell #970

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

Closed
mpickering opened this issue Feb 11, 2020 · 3 comments
Closed

Use object files for Template Haskell #970

mpickering opened this issue Feb 11, 2020 · 3 comments

Comments

@mpickering
Copy link
Contributor

Following many of the same reasons as haskell/ghcide#355, it would be beneficial to use object files for supporting TemplateHaskell rather than bytecode because it can be cached between runs.

It is also necessary to stop ghcide caching a typechecked module are all transitive dependencies as this uses too much memory on big code bases, at least until there is a garbage collection story.

This patch is implemented on this branch: https://github.com/mpickering/ghcide/tree/wip/object-files

Questions to resolve:

  • How do we decide whether to preemptively generate an object file or not? It is too slow to do on every keystroke.
  • Do we want to retain support for ByteCode, perhaps toggling between the two if -fobject-code is passed?
@pepeiborra
Copy link
Collaborator

Why not serialize ByteCode?

@mpickering
Copy link
Contributor Author

@pepeiborra I'm not aware of any way to currently do that, so I would also have to implement it. Do you know that it's possible?

@jneira
Copy link
Member

jneira commented Oct 5, 2020

afaiu ghcide master already has it with haskell/ghcide#836! 😃

@jneira jneira closed this as completed Oct 5, 2020
@pepeiborra pepeiborra transferred this issue from haskell/ghcide Jan 1, 2021
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

3 participants