You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Inductive types
Constructors
Modules
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;
Current goals:
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:
Related:
The text was updated successfully, but these errors were encountered: