package odoc
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
OCaml documentation generator
Install
dune-project
Dependency
Authors
Maintainers
Sources
odoc-2.1.1.tbz
sha256=f574dbd28cd0fc3a2b95525c4bb95ddf6d1f6408bb4fe12157fa537884f987fd
sha512=1c545c281a7022a167f028fff8cec6fb3f2f82da0881431be74e7a4281c5353ed83bfbdb4d9d9e08af6755dbe3505c052c5e5b58cdeb08c57aed5e89c0f15e91
doc/src/odoc.odoc/odoc_link.ml.html
Source file odoc_link.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46open Or_error let link_page ~resolver ~filename page = let env = Resolver.build_env_for_page resolver page in Odoc_xref2.Link.resolve_page ~filename env page let link_unit ~resolver ~filename m = let open Odoc_model in let open Lang.Compilation_unit in let m = if Root.Odoc_file.hidden m.root.file then { m with content = Module { items = []; compiled = false; doc = [] }; expansion = None; } else m in let env = Resolver.build_env_for_unit resolver ~linking:true m in Odoc_xref2.Link.link ~filename env m (** [~input_warnings] are the warnings stored in the input file *) let handle_warnings ~input_warnings ~warnings_options ww = let _, warnings = Odoc_model.Error.unpack_warnings ww in Odoc_model.Error.handle_warnings ~warnings_options ww >>= fun res -> Ok (res, input_warnings @ warnings) (** Read the input file and write to the output file. Also return the resulting tree. *) let from_odoc ~resolver ~warnings_options input output = let filename = Fs.File.to_string input in Odoc_file.load input >>= fun unit -> let input_warnings = unit.Odoc_file.warnings in match unit.content with | Page_content page -> link_page ~resolver ~filename page |> handle_warnings ~input_warnings ~warnings_options >>= fun (page, warnings) -> Odoc_file.save_page output ~warnings page; Ok (`Page page) | Unit_content m -> link_unit ~resolver ~filename m |> handle_warnings ~input_warnings ~warnings_options >>= fun (m, warnings) -> Odoc_file.save_unit output ~warnings m; Ok (`Module m)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>