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

Specialize #209

Merged
merged 9 commits into from
Sep 1, 2023
Merged

Specialize #209

merged 9 commits into from
Sep 1, 2023

Conversation

BillHallahan
Copy link
Owner

No description provided.

-- 3) Names of functions in rules in the ModDetails may have been changed by bindings.
-- As such, we keep:
-- 1) Rules from the ModDetails
-- 2) Rules from the untidied CoreBinds, if a rule with the same name is not in ModDetails
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am just a bit confused about what ModDetails and untidied CoreBinds do.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition, what does it mean to be tidied and untidied in this scenario?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarified this comment a bit.

@@ -250,22 +250,33 @@ mkCgGutsModDetailsClosures tr_con env modgutss = do
tidys <- mapM (tidyProgram env) simplgutss
#endif

let pairs = map (\((cg, md), mg) -> ( mkCgGutsClosure (mg_binds mg) cg
let pairs = map (\((cg, md), mg) -> ( mkCgGutsClosure (mg_binds mg) cg md
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is line 253 and line 239 describe the same thing and I think I might need a comment on what pairs are used for?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is (I think unavoidable) a bit messy because GHC has changed how it works several times, and we are currently trying to support GHC 8.2 - 9.6. So lines 239 and 253 are the same, but notice we have C Pragmas controlling which get's executed based on the GHC version.

I added a comment to the function- really pairs is just information the function returns about stuff that it extracted from GHC. If you're wondering something more specific, lmk.

@BillHallahan BillHallahan merged commit a7e7159 into master Sep 1, 2023
23 checks passed
@BillHallahan BillHallahan deleted the specialize branch September 1, 2023 18:17
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

Successfully merging this pull request may close these issues.

2 participants