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

Merlin jumps to incorrect position (or fails to jump) for type that comes from functor #1610

Open
ddickstein opened this issue May 17, 2023 · 0 comments
Labels

Comments

@ddickstein
Copy link
Contributor

ddickstein commented May 17, 2023

Tested on 8f1d3f1

module type T = sig
  type 'a t
end

module M (T : T) = struct
  type t = int T.t
end

module N (T : T) = struct
  type t = M(T).t
end

If I try to jump to the definition of t inside functor N, it jumps to the current type definition, even though this is not a recursive definition of t. If I specify nonrec and then try it, I get "Not in environment 't'".

voodoos added a commit to voodoos/merlin that referenced this issue May 22, 2023
voodoos added a commit to voodoos/merlin that referenced this issue May 23, 2023
This treat an application as a single components so it is not a satisfing long-term solution.

A better approach would be to change the return type of [reconstruct_identifier] to account for module application.

This fixes ocaml#1610
voodoos added a commit to voodoos/merlin that referenced this issue May 24, 2023
voodoos added a commit to voodoos/merlin that referenced this issue May 24, 2023
This treat an application as a single components so it is not a satisfing long-term solution.

A better approach would be to change the return type of [reconstruct_identifier] to account for module application.

This fixes ocaml#1610
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants