On Fri, Oct 5, 2012 at 10:22 AM, Sean Leather <leather@cs.uu.nl> wrote:
I also like the proposal; however, I think it only makes sense if the set of unbound variables with the same name is treated as referring to the same identifier. This was, after all, the main reason for named holes. Roman expected this, and I think everybody who uses the feature will expect it.
Here's a thought that just occurred to me, though I'm not yet sure if it makes sense. Treat all expression identifiers _x as unique but report them as one hole with all possible types. Then, you can visually identify the patterns between the types. So:> f x = _y> g x = _y 'a'with some warning like this:Found hole `_y' in multiple locations with the possible typesFile.hs:##:##: a0File.hs:##:##: Char -> b0Now, I know by looking at it that `a0' and `b0' are universally quantified per location, but I can do some mental unification myself.