Skip to content

Commit

Permalink
Link to Ocamlary from index of pages
Browse files Browse the repository at this point in the history
and add an example of comments associated to polymorphic variants

Signed-off-by: Paul-Elliot <[email protected]>
  • Loading branch information
panglesd committed Jul 5, 2023
1 parent f82b311 commit fa22aea
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/driver.mld
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ let dep_libraries =
let odoc_libraries = [
"odoc_xref_test"; "odoc_xref2"; "odoc_odoc"; "odoc_html_support_files";
"odoc_model_desc"; "odoc_model"; "odoc_manpage"; "odoc_loader";
"odoc_latex"; "odoc_html"; "odoc_document"; "odoc_examples" ];;
"odoc_latex"; "odoc_html"; "odoc_document"; "odoc_examples"; "ocamlary" ];;

let all_libraries = dep_libraries @ odoc_libraries;;

Expand Down
3 changes: 2 additions & 1 deletion doc/library_mlds/dune
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
odoc_model_desc
odoc_odoc
odoc_xref2
odoc_xref_test))
odoc_xref_test
ocamlary))
3 changes: 3 additions & 0 deletions doc/library_mlds/ocamlary.mld
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{0 Ocamlary}

A demonstration of the rendering of most of the OCaml constructs {!module-Ocamlary}.
1 change: 1 addition & 0 deletions doc/odoc.mld
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ The main other pages of this site:
- {!page-dune} Dune
- {!page-parent_child_spec} Parent/Child specification
- {!page-interface} Interface guarantees
- {!page-ocamlary} A demonstration of the rendering of most of the OCaml constructs

4 changes: 3 additions & 1 deletion src/ocamlary/ocamlary.mli
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ type variant =
(** This comment is also for [variant]. *)

(** This comment is for [poly_variant]. *)
type poly_variant = [ `TagA | `ConstrB of int ]
type poly_variant =
[ `TagA (** This is a comment for [`TagA] *)
| `ConstrB of int (** This is a comment for [`ConstrB] *) ]
(** Wow! It was a polymorphic variant! *)

(** This comment is for [full_gadt]. *)
Expand Down

0 comments on commit fa22aea

Please sign in to comment.