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

Implement an html documentation generator similar to Haddock #1413

Closed
janmasrovira opened this issue Jul 25, 2022 · 0 comments · Fixed by #1416
Closed

Implement an html documentation generator similar to Haddock #1413

janmasrovira opened this issue Jul 25, 2022 · 0 comments · Fixed by #1416
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@janmasrovira
Copy link
Collaborator

janmasrovira commented Jul 25, 2022

Current goals:

  • It will be part of the compiler, not an external tool (at least for now).
  • It should be possible to write Haddock comments, or Judoc comments (as we shall call them for now), to document different parts of a program. On the first iteration we will only support functions. Later we want to add
    1. Inductive types
    2. Constructors
    3. Modules
    4. Individual function arguments (to be discussed)
  • Will support a very basic language described below. In the nearish future we may want to discuss if we want to support a popular markup language, such as Markdown, and rely on an existing parser.
  • The Judoc comments need to be scoped and type checked.

The initial syntax of Judoc comments is very simple and will change in the future.
A Judoc comment spans multiple lines. Each line must start with --- (note the trailing space).
A Judoc comment can have text and inlined expressions (surrounded by ;). Having ; as a delimiter is convenient because it is already a reserved symbol of the language (needed for parsing).

Example:

module Example;

--- The identity function.
--- Example:
--- ;id Type; is the same as ;Type;
id : {A : Type} -> A -> A;
id a := a;

end;

Related:

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

Successfully merging a pull request may close this issue.

1 participant