Skip to content

Add inlining directives for data types#105

Open
natefaubion wants to merge 2 commits intomainfrom
ctor-directive
Open

Add inlining directives for data types#105
natefaubion wants to merge 2 commits intomainfrom
ctor-directive

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