package sherlodoc
All checked builds pass sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Search engine for OCaml documentation
Install
dune-project
Dependency
Authors
Maintainers
Sources
odoc-3.2.2.tbz
sha256=d7b9567ec9f2f99c4557999d78e268c97bcb5cab8770b5e74d694f5abd6dffae
sha512=444aedb4bbf132c45a198f73dbd282048a1e76cd4df739f530334f4c575575784e5db49392c798b997db9ae5d429a40a3618de7ffe71e5a60fbb29c67d5a7da2
doc/src/sherlodoc.query/dynamic_cost.ml.html
Source file dynamic_cost.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 30module Entry = Db.Entry type query = { name : string list ; type_paths : Type_distance.t option } let of_query { Query_parser.name; typ } = let type_paths = match typ with | `typ t -> Some (Type_distance.paths_of_type t) | _ -> None in { name; type_paths } let type_distance query_type entry = match query_type, Entry.Kind.get_type entry.Entry.kind with | Some query_paths, Some entry_type -> Some (Type_distance.v ~query_paths ~entry:entry_type) | Some _, None -> Some 1000 | _ -> None let score query entry = let name_matches = Name_cost.best_matches query.name entry.Db.Entry.name in let type_cost = match type_distance query.type_paths entry with | Some cost -> cost | None -> 0 in 5 * (name_matches + type_cost)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>