-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Support resolve in type lenses #3743
Conversation
Not sure why the CI isn't running. Maybe fix the conflicts and push again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, just a couple nits
=~ ("(Top-level binding|Pattern synonym) with no type signature" :: T.Text) | ||
, Just (GlobalBindingTypeSigsResult sigs) <- mGblSigs | ||
, Just sig <- find (\x -> sameThing (gbSrcSpan x) _range) sigs | ||
-- If a PositionMapping is supplied, this function will call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I made a comment about this and it got lost - why can't it be the caller's responsibility to map the Range?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I marked your previous comment as resolved, because I did move the range position mapping stuff to the caller. However the position mapping is still sent to the function that generates lenses from the global signature
I was hoping to merge all signature related stuff into one plugin, as it gives refactoring flexibility in changing rules and some functions. Unfortunately, the plugin that currently includes those code actions is hls-refactor, which is very creatively engineered. Hence, I had to give up on that effort.
I have so far come across two bugs in type-lenses HEAD, one where long signatures are formatted incorrectly, which is fixed here by putting the signature into a single line. The other, where local bindings mostly don't work is still unresolved. I hope to solve that and fix it here before merging, but currently still unsure what's causing it.