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.document/targets.ml.html
Source file targets.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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75open StdLabels let rec unit (t : Odoc_model.Lang.Compilation_unit.t) = let url = Url.Path.from_identifier t.id in let rest = match t.content with Module sign -> signature sign | Pack _ -> [] in url :: rest and signature (t : Odoc_model.Lang.Signature.t) = let rec add_items ~don't acc = function | [] -> List.concat (List.rev acc) | i :: is -> ( match i with | Odoc_model.Lang.Signature.Comment `Stop -> add_items ~don't:(not don't) acc is | _ when don't -> add_items ~don't acc is | Module (_, md) -> add_items ~don't (module_ md :: acc) is | ModuleType mty -> add_items ~don't (module_type mty :: acc) is | Include incl -> add_items ~don't (include_ incl :: acc) is | Open _ | ModuleSubstitution _ | ModuleTypeSubstitution _ | TypeSubstitution _ | Type _ | TypExt _ | Exception _ | Value _ | Class _ | ClassType _ | Comment (`Docs _) -> add_items ~don't acc is) in add_items ~don't:false [] t.items and simple_expansion (t : Odoc_model.Lang.ModuleType.simple_expansion) = match t with | Signature sg -> signature sg | Functor (p, expn) -> let subpages = match p with Unit -> [] | Named { expr; _ } -> module_type_expr expr in subpages @ simple_expansion expn and module_type_expr (t : Odoc_model.Lang.ModuleType.expr) = let open Odoc_model.Lang.ModuleType in let opt_expansion e_opt = match e_opt with Some e -> simple_expansion e | None -> [] in match t with | Signature sg -> signature sg | Functor (f_parameter, e) -> let sub = match f_parameter with Unit -> [] | Named f -> module_type_expr f.expr in sub @ module_type_expr e | Path { p_expansion = e_opt; _ } | With { w_expansion = e_opt; _ } | TypeOf { t_expansion = e_opt; _ } -> opt_expansion e_opt and module_ (t : Odoc_model.Lang.Module.t) = let url = Url.Path.from_identifier t.id in let subpages = match t.type_ with | Alias (_, Some e) -> simple_expansion e | Alias (_, None) -> [] | ModuleType expr -> module_type_expr expr in url :: subpages and module_type (t : Odoc_model.Lang.ModuleType.t) = match t.expr with | None -> [] | Some expr -> let url = Url.Path.from_identifier t.id in let subpages = module_type_expr expr in url :: subpages and include_ (t : Odoc_model.Lang.Include.t) = signature t.expansion.content and page (t : Odoc_model.Lang.Page.t) = [ Url.Path.from_identifier t.name ]
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>