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

[ elab ] Support easy collection of information during TTImp traverse #3193

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

buzden
Copy link
Contributor

@buzden buzden commented Jan 15, 2024

Description

Current applicative traversals introduced at #3130 can be used for analysis of an expression, e.g. for collecting some data. But since currently the only way to analyse expression is to analyse the result of pure, used Applicative must contain at least on level of expressions, disallowing simple stuff like Const functor for applicative traversals for collecting the data.

But once we pass the original expression along with the current data to the user function, we gain the ability to traverse the data with simple applicatives, like Const. You can see an example of such collecting traversal in the newly added test.

This is a backward-compatible change in terms of main existing functions mapATTImp and mapMTTImp. However, intermediate functions for mapM<WhateveElse> changed their signatures to support using mapATTImp' internally.

Should this change go in the CHANGELOG?

  • If this is a fix, user-facing change, a compiler change, or a new paper
    implementation, I have updated CHANGELOG_NEXT.md (and potentially also
    CONTRIBUTORS.md).

@buzden buzden force-pushed the alternative-applicative-traversal branch from 5ec6e10 to b36c0dd Compare January 31, 2024 12:33
@buzden buzden force-pushed the alternative-applicative-traversal branch from b36c0dd to f2c0d17 Compare February 12, 2024 21:46
@gallais gallais merged commit 8144980 into idris-lang:main Feb 23, 2024
22 checks passed
@buzden buzden deleted the alternative-applicative-traversal branch February 23, 2024 21:33
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