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

search modulo type isomorphisms #21

Open
polux opened this issue Oct 14, 2011 · 3 comments
Open

search modulo type isomorphisms #21

polux opened this issue Oct 14, 2011 · 3 comments

Comments

@polux
Copy link

polux commented Oct 14, 2011

It would be awesome if (a => b) => list[a] => list[b] would find map. Modulo instanciation (list[int] => (int => float) => list[float]) would be great too.

@david-christiansen
Copy link

I'm personally not a fan of type isomorphisms for search, as I think the Hoogle approach is much better. Isomorphisms are good in that they let you re-arrange arguments, but they're not as practical when Unit starts getting involved, and they can mask important differences in side effects. The Hoogle approach of creating an infinite type graph and finding a sort of "edit distance" with a variant of Dijkstra's algorithm is nicer, as it also finds cases when the user forgot an argument or had one too many.

@polux
Copy link
Author

polux commented Nov 11, 2011

Ok, maybe not full isomorphisms then. What I meant is that I mostly miss argument permutations and instantiation (I've seen Brent's slide about hoogle's approach some time ago and that was indeed the kind of approach I was advocating.)

@david-christiansen
Copy link

We're in agreement then :-) The difficult thing is figuring out how to integrate subtyping and mixins into the Hoogle approach - it's not totally trivial, in my opinion!

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

2 participants