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

fstar-jump-to-definition on a module should jump to the fsti if it exists #107

Open
jaybosamiya opened this issue May 23, 2019 · 1 comment · May be fixed by #108
Open

fstar-jump-to-definition on a module should jump to the fsti if it exists #107

jaybosamiya opened this issue May 23, 2019 · 1 comment · May be fixed by #108

Comments

@jaybosamiya
Copy link
Member

Currently, M-. (fstar-jump-to-definition) jumps to the fst of the module, when we do it over an open ModuleName, even if an fsti exists. I think it would be better if it were to jump over to the fsti and rely on a user to press C-c C-a (fstar-visit-interface-or-implementation) if need be to jump over to the implementation.

Not sure if this is something that needs to be fixed on the compiler side or on the fstar-mode side, but it would be a nice QoL improvement.

@cpitclaudel
Copy link
Contributor

I think this is F* side; we just jump to the position it reports. But we could work around it on our side if needed. Here's I'd go about it (I don't have time to dive into it myself atm, but I think you could give it a try):

  • Turn debugging on.
  • Do a jump to definition
  • Look at what F* returns; I don't recall if it's easily distinguishable from a usual jump to a specific definition (in fact, this might even be special-cased in fstar-mode to jump directly to a file)
  • Find the corresponding bit in fstar-mode (ask me for help if this part is tricky)
  • Change it to test if an fsti is present and jump there if so

I would predicate the last part on a setting, but I wouldn't object to making jumping to the fsti the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants