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

Non-judoc comments are removed when generating HTML output #1723

Closed
lukaszcz opened this issue Jan 12, 2023 · 3 comments · Fixed by #1766
Closed

Non-judoc comments are removed when generating HTML output #1723

lukaszcz opened this issue Jan 12, 2023 · 3 comments · Fixed by #1766
Assignees
Labels
enhancement New feature or request html judoc Juvix documentation generation

Comments

@lukaszcz
Copy link
Collaborator

lukaszcz commented Jan 12, 2023

This makes it impossible to e.g. write a comment above an import statement.

It also makes it hard to write a tutorial as a Juvix file and generate nice html output for it.

@lukaszcz lukaszcz added bug html pending-review judoc Juvix documentation generation labels Jan 12, 2023
@lukaszcz lukaszcz added this to the 0.3 milestone Jan 12, 2023
@janmasrovira janmasrovira added enhancement New feature or request and removed bug labels Jan 14, 2023
@paulcadman
Copy link
Collaborator

The same issue affects the formatter, but we have no ideas on how to fix it. #1593

@janmasrovira
Copy link
Collaborator

I have been thinking about this today.
Collecting the string comments is an easy task. The hard part is printing them in the appropriate place wihtout storing them in the ast.
I've been looking at the implementation of ghc's exact print for inspiration. It looks a bit hacky but I'll see what I can get out of it

@paulcadman
Copy link
Collaborator

An interesting note on GHC exact printing annotations: https://gitlab.haskell.org/ghc/ghc/-/wikis/api-annotations

@janmasrovira janmasrovira linked a pull request Jan 25, 2023 that will close this issue
jonaprieto pushed a commit that referenced this issue Jan 27, 2023
- Fixes #1723 
- It refactors parsing/scoping so that the scoper does not need to read
files or parse any module. Instead, the parser takes care of parsing all
the imported modules transitively.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request html judoc Juvix documentation generation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants