Skip to content

Commit

Permalink
Added docs and changelog entry for polymorphic variants resolving
Browse files Browse the repository at this point in the history
Signed-off-by: Paul-Elliot <[email protected]>
  • Loading branch information
panglesd committed Jul 11, 2024
1 parent 7a4468d commit 8a57083
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
- Add a marshalled search index consumable by sherlodoc (@EmileTrotignon, @panglesd, #1084)
- Add a `--index` argument to pass indexes to the document generation, currently
used for sidebar (@panglesd, #1145)
- Allow referencing of polymorphic constructors in polymorphic variant type
aliases (@panglesd, #1115)

### Changed

Expand Down
4 changes: 4 additions & 0 deletions doc/ocamldoc_differences.mld
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ Additionally we support extra annotations:
- [page] refers to [.mld] pages as outlined above
- [value] is recognised as [val]

Moreover, [odoc] adds support for referencing of polymorphic variants in type
aliases such as [type t = [ `A ]]. The [constructor] annotation is extended for
polymorphic variants.

{3 Referencing items containing hyphens or dots}

If it is necessary to reference a reference that contains hyphens or dots - e.g. if you have a file [docs-with-dashes.mld] or
Expand Down
4 changes: 3 additions & 1 deletion doc/odoc_for_authors.mld
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,9 @@ The prefixes supported are:
- [type]
- [exception] (and the equivalent deprecated prefix [exn])
- [method]
- [constructor] (and the equivalent deprecated prefix [const])
- [constructor] (and the equivalent deprecated prefix [const]) both for normal
constructors and polymorphic constructors defined in a type alias. The
backtick [`] in polumorphic constructor is optional.
- [extension]
- [extension-decl] for refering to the declaration point of an extension constructor
- [field] (and the equivalent deprecated prefix [recfield])
Expand Down

0 comments on commit 8a57083

Please sign in to comment.