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

Added docs and changelog entry for polymorphic variants resolving #1158

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading