diff --git a/CHANGES.md b/CHANGES.md index 42732d1560..22b04ce703 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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 diff --git a/doc/ocamldoc_differences.mld b/doc/ocamldoc_differences.mld index 507ea754f6..5c1ce16d7a 100644 --- a/doc/ocamldoc_differences.mld +++ b/doc/ocamldoc_differences.mld @@ -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 diff --git a/doc/odoc_for_authors.mld b/doc/odoc_for_authors.mld index 2f25b9ff36..e17d4e55c3 100644 --- a/doc/odoc_for_authors.mld +++ b/doc/odoc_for_authors.mld @@ -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])