Module Odoc_xref2.ComponentSource

Component module

Sourcemodule ModuleMap : Map.S with type key = Ident.module_
Sourcemodule TypeMap : Map.S with type key = Ident.type_

Useful maps

Sourcemodule IdentMap : Map.S with type key = Ident.any
Sourcemodule Delayed : sig ... end

Delayed is a bit like Lazy.t but may in the future offer the chance to peek inside to be able to optimize the calculation

Sourcemodule Opt : sig ... end

Components

The modules/types here are very similar to those in Odoc_model.Lang, in most cases the only difference being that we have Idents (which are local) rather than Identifiers (which are global), Cpaths instead of Paths, and Cfrags rather than Fragments. All of these are to support the use of local idents.

Note that we still use global References rather than local ones - this is because at the point these components are being used all the references are unresolved, and hence do not contain any resolved global identifiers. When resolving references, we construct paths in parallel, which also helps avoid the need for local references.

These idents of items are kept outside of the types themselves in order to help with laziness.

There are a few other minor differences:

Sourcemodule Module : sig ... end
Sourcemodule ModuleSubstitution : sig ... end
Sourcemodule ModuleTypeSubstitution : sig ... end
Sourcemodule TypeExpr : sig ... end
Sourcemodule Extension : sig ... end
Sourcemodule Exception : sig ... end
Sourcemodule FunctorParameter : sig ... end
Sourcemodule ModuleType : sig ... end
Sourcemodule TypeDecl : sig ... end
Sourcemodule Signature : sig ... end
Sourcemodule Open : sig ... end
Sourcemodule Include : sig ... end
Sourcemodule Value : sig ... end
Sourcemodule Class : sig ... end
Sourcemodule ClassType : sig ... end
Sourcemodule ClassSignature : sig ... end
Sourcemodule Method : sig ... end
Sourcemodule InstanceVariable : sig ... end
Sourcemodule Substitution : sig ... end
Sourcemodule CComment : sig ... end
Sourcemodule Label : sig ... end
Sourcemodule Element : sig ... end
Sourcemodule Fmt : sig ... end

Formatting functions for components

Sourcemodule Of_Lang : sig ... end
Sourceval module_of_functor_argument : FunctorParameter.parameter -> Module.t
Sourceval extract_signature_doc : Signature.t -> CComment.docs