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

Documentation updates for predicate functions that rely on match #97

Open
nstepp opened this issue Feb 1, 2021 · 1 comment
Open

Documentation updates for predicate functions that rely on match #97

nstepp opened this issue Feb 1, 2021 · 1 comment

Comments

@nstepp
Copy link

nstepp commented Feb 1, 2021

Functions that rely on match and also take a function involving Context show expected, but poorly documented behavior.

The issue comes up when user functions that are supposed to operate on Contexts receive them as part of a recursive graph decomposition. As such, the graph that the contexts belong to gets smaller and smaller. User expectations are usually that if the starting graph has a particular context, that is the one that their function receives, as opposed to a context from a subsequent decomposition. This has come up before in #55 and #89.

I think this is at least a documentation fix, but it would also be useful to add some functions for mapping and folding over "full" contexts.

Would the maintainers be interested in pull requests for either?

@nstepp
Copy link
Author

nstepp commented Feb 2, 2021

I just saw 84a89c4, but I still wonder if the ramifications of recursively calling match should be spelled out somewhere.

In any case, I'm also still curious about the possibility of something like cmap :: Graph g => (Context a b -> Context c d) -> g a b -> g c d or cfold :: Graph g => (Context a b -> c -> c) -> c -> g a b -> c that do not recursively call match. At the very least, it would be useful to have an efficient version of something that does Graph g => g a b -> [Context a b].

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

No branches or pull requests

1 participant