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

Locate constructors' exact positions #1537

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

voodoos
Copy link
Collaborator

@voodoos voodoos commented Dec 1, 2022

Currently Merlin will locate the type of a constructor, not the constructor itself.
This is much improved in that PR.

@voodoos voodoos changed the title Locate constructor exact positions Locate constructors' exact positions Dec 1, 2022
val in_namespaces
: Namespace.inferred list
-> Longident.t
-> Env.t
-> (Path.t * Shape.Sig_component_kind.t * Shape.Uid.t * Location.t) option
-> (Path.t * Shape.Sig_component_kind.t * Shape.Uid.t * Location.t * bool) option
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to switch bool to a more descriptive type? For example some (polymorphic?) variant describing the two options?

@voodoos voodoos force-pushed the locate-constructor-exact-pos branch from a1ffdc0 to 2dcfaa6 Compare December 2, 2022 14:20
@voodoos
Copy link
Collaborator Author

voodoos commented Dec 9, 2022

After discussing this issue with @pitag-ha we realized that it only answers the problem for type's declarations, not definitions. I am turning this into a draft while looking for a more robust answer.

@voodoos voodoos marked this pull request as draft December 9, 2022 14:48
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