Skip to content
New issue

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

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

Already on GitHub? # to your account

Eval plugin for GHC 9.4 #3391

Merged
merged 1 commit into from
Feb 22, 2023
Merged

Eval plugin for GHC 9.4 #3391

merged 1 commit into from
Feb 22, 2023

Conversation

wz1000
Copy link
Collaborator

@wz1000 wz1000 commented Dec 9, 2022

Supersedes #3249 and depends on #3390

@michaelpj
Copy link
Collaborator

Looks like Pepe's question never got answered (#3249 (comment)), but I'm okay with this anyway. Has conflicts now.

@michaelpj
Copy link
Collaborator

What's the status of this?

@wz1000
Copy link
Collaborator Author

wz1000 commented Jan 23, 2023

This is ready for review

@pepeiborra setupDynFlagsForGHCiLike doesn't do much as setting the optimisation level to 0 sets the same set of flags.

@wz1000 wz1000 force-pushed the wip/9.4-eval-plugin branch 2 times, most recently from 2627c13 to 4541fef Compare January 25, 2023 12:48
@pepeiborra
Copy link
Collaborator

The plugin was implemented by calling "load" which circumvents all of HLSs caching mechanisms for interface files and linkables. Instead we should work like the other typechecking functions which get all the stuff we need using HLS rules and setup the HscEnv with all the state in the right places.

Is there any way to check this in a test? Or a benchmark? Seems like an important property.

@wz1000
Copy link
Collaborator Author

wz1000 commented Feb 15, 2023

The plugin was implemented by calling "load" which circumvents all of HLSs caching mechanisms for interface files and linkables. Instead we should work like the other typechecking functions which get all the stuff we need using HLS rules and setup the HscEnv with all the state in the right places.

Is there any way to check this in a test? Or a benchmark? Seems like an important property.

I don't thin there is an easy way to do this. We can blacklist the load family of functions using hlint.

@michaelpj
Copy link
Collaborator

Blacklisting the functions sounds good!

@wz1000 wz1000 force-pushed the wip/9.4-eval-plugin branch from 2762851 to 13f09c8 Compare February 16, 2023 10:52
@wz1000 wz1000 enabled auto-merge (rebase) February 16, 2023 10:52
@wz1000 wz1000 force-pushed the wip/9.4-eval-plugin branch from 13f09c8 to f17707c Compare February 16, 2023 10:54
@wz1000
Copy link
Collaborator Author

wz1000 commented Feb 16, 2023

I have added an hlint rule and also fixed a regression that caused the eval plugin not to work due to #3414 landing. See the comment in the last commit for details.

@wz1000 wz1000 force-pushed the wip/9.4-eval-plugin branch 3 times, most recently from ed2980f to 6a8d585 Compare February 21, 2023 13:18
The plugin was implemented by calling "load" which circumvents all of
HLSs caching mechanisms for interface files and linkables. Instead we
should work like the other typechecking functions which get all the
stuff we need using HLS rules and setup the HscEnv with all the state in
the right places.

The key part to this is setting up all the HPT modules with linkables if
they are depenedencies of the module we are trying to run a function
from.

- ban load functions from GHC driver

- Enable CI for hls-eval-plugin and fix a bug due to clearing of mi_globals
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants