-
Notifications
You must be signed in to change notification settings - Fork 58
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
Browsable source code #294
Comments
For an example source idr file, pygments can generate prettly decent colorful html. The colors and lexer itself is customizable. Check the rarw code of gists input idr fileand output html. The output html should be downloaded and opened in your browser. Command used is as follows:
So getting to html colorful code is easy. |
For linking, we have to customize (extend) the html formatter for idris1 in pygments. And also, to make it support idris2, we might have to extend the pygment's lexer as well. For doing the linking part, we should be able to get this information from the idris2 compiler about how it parses and resolves the declaration and usage of types/variable/functions etc. Assuming the above information is available, conceptually the process of linking can go like this
|
Do we gain much by using pygment rather than outputting e.g. markdown to be Re, looking at rendered examples we can use htmlpreview.github.io. |
We must also look at how it works in Idris1 where you can use the |
@jfdm @gallais I will look into them. I might be little slow as I am learning Idris along the way.
|
MarcelineVQ (at IRC) pointed at the Agda browsable source code. Agda stdlib example . This looks good for browsing source code, wherein we can go through various variables and jump across the code for declarations/definitions etc. Also, we can discuss various approaches for doing the same here.
The text was updated successfully, but these errors were encountered: