package odoc

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Path : sig ... end
module Anchor : sig ... end
type kind = Anchor.kind
type t = Anchor.t
val from_path : Path.t -> t
val from_identifier : stop_before:bool -> Odoc_model.Paths.Identifier.t -> t

from_identifier turns an identifier to an url.

Some identifiers can be accessed in different ways. For instance, submodules generate a dedicated page, but they can also be linked to at their parent page, using a hash to the declaration.

The stop_before boolean controls that: with ~stop_before:true, the url will point to the parent page when applicable.

There is a pitfall with from_identifier: Using ~stop_before:false with a module that does not contain an expansion, such as a module alias. This will return a url leading to a 404 page.

It would be nice to enforce no 404 by the type system.

val from_asset_identifier : Odoc_model.Paths.Identifier.AssetFile.t -> t
val render_path : Odoc_model.Paths.Path.t -> string
OCaml

Innovation. Community. Security.