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/url.ml.html
Source file url.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 46 47 48 49 50 51 52 53 54 55 56open Result let resolve url_to_string directories reference = let resolver = Resolver.create ~important_digests:false ~directories ~open_modules:[] in let reference = let open Odoc_model in let warnings_options = { Error.warn_error = true; print_warnings = true } in Semantics.parse_reference reference |> Error.handle_errors_and_warnings ~warnings_options in match reference with | Error e -> Error e | Ok reference -> ( let environment = Resolver.build_env_for_reference resolver in let resolved_reference = Odoc_xref2.Ref_tools.resolve_reference environment reference |> Odoc_model.Error.raise_warnings in match resolved_reference with | Error e -> let error = Format.asprintf "%a" Odoc_xref2.Errors.Tools_error.pp_reference_lookup_error e in Error (`Msg error) | Ok resolved_reference -> ( let identifier = Odoc_model.Paths.Reference.Resolved.identifier resolved_reference in let url = Odoc_document.Url.from_identifier ~stop_before:false identifier in match url with | Error e -> Error (`Msg (Odoc_document.Url.Error.to_string e)) | Ok url -> let href = url_to_string url in print_endline href; Ok ())) let reference_to_url_html root_url = let url_to_string url = let base = match root_url with | None | Some "" -> "" | Some base -> if base.[String.length base - 1] = '/' then base else base ^ "/" in Odoc_html.Link.(href ~resolve:(Base base) url) in resolve url_to_string let reference_to_url_latex = let url_to_string url = Odoc_latex.Generator.Link.label url in resolve url_to_string
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>