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

Add inlining directives for data types #105

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

natefaubion
Copy link
Collaborator

This is a very basic implementation of #72 which might help with things such as large generics inlining. Adding a directive such as:

-- @inline Data.Generic.Rep.Sum always

Will make the optimizer extremely eager to distribute a continuation over bindings that evaluate to a known constructor of type Sum. Note that the directive is on the data type, not individual constructors.

cc @MonoidMusician Any thoughts on this approach?

@natefaubion
Copy link
Collaborator Author

natefaubion commented Apr 14, 2024

@MonoidMusician I've adjusted the heuristics so that the large generics example will inline without needing an annotation on the generics data types. I would love to hear if you have any thoughts or improvements to these.

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.

1 participant