Handle Functor Composition in Generic Instances #1103
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes all cases of #1059 that are known to me.
The changes are minimally-invasive with regard to the existing setup. However, they only allow the pattern
f :.: Rec1 g
for composition. I do not know if this covers all the cases that can arise withDeriveGeneric
or if there is maybe a more clever way to set things up (see #1059 (comment)).I am submitting this as a draft pull request since I still need to check some things and add regression tests. Since I barely understand the existing infrastructure, I would be grateful for early feedback on whether the proposed implementation is on the right track.
Once completed, I would only want this to be merged after someone more knowledgeable takes a critical look at it.
Tasks: