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

Enabling links in Coq code #99

Open
patrick-nicodemus opened this issue Jul 31, 2024 · 1 comment
Open

Enabling links in Coq code #99

patrick-nicodemus opened this issue Jul 31, 2024 · 1 comment

Comments

@patrick-nicodemus
Copy link

patrick-nicodemus commented Jul 31, 2024

This is probably doable but none of the examples in the gallery illustrate how to do it, which suggests that it's not obvious how to do it.

A quick scan through this page https://coq.inria.fr/doc/V8.19.2/stdlib/Coq.Init.Datatypes.html#bool shows that there are many, many hyperlinks in the page, it is very easy to go to the definition of something when you see it in a proof and you don't know what it means. I think this is really an important property of literate programming, to easily go to the definition of something you are reading.

Currently :coqid: and its extensions are only usable outside the Coq code, so if you want to have your page link to definitions it has to be outside of the Coq code itself. This seems like it would make the text more verbose. So is it possible to make Coq identifers be clickable as links to go to their definition?

@cpitclaudel
Copy link
Owner

Duplicate of #27 I think?

It would be really nice, indeed. What's needed for this is either:

  • Extending Alectryon to parse glob files, which is a pain and doesn't work within one reST or Markdown file (it only works for .v files).
  • Extending the protocol to return that information (happened to some degree in coq-lsp, but Alectryon doesn't speak LSP right now)

Then it's a matter of formatting that info in the right ways.

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

No branches or pull requests

2 participants