package sherlodoc
Search engine for OCaml documentation
Install
Dune Dependency
Authors
Maintainers
Sources
odoc-3.1.0.tbz
sha256=355b3cfff4934903cbaed8b51ce35e333e8609932d230294200a9f2d42ffa914
sha512=f78318d0a16164a9cd16ee02f611c2e00d32b772fe38e992d6db6ec94b1c00cd9c377fbfe64031b8f245e57b2f3aac9364108327e7f1693533ddcff94c476e05
doc/src/sherlodoc.db/typexpr.ml.html
Source file typexpr.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
type t = | Arrow of t * t | Constr of string * t list | Tuple of t list | Poly of string | Any | Unhandled let tuple = function | [] -> Any | [ x ] -> x | xs -> Tuple xs let rec show = function | Arrow (a, b) -> show_parens a ^ " -> " ^ show b | Constr (t, []) -> t | Constr (t, [ x ]) -> show_parens x ^ " " ^ t | Constr (t, xs) -> "(" ^ show_list xs ^ ") " ^ t | Tuple xs -> show_tuple xs | Poly "" -> "'_" | Poly name -> "'" ^ name | Any -> "_" | Unhandled -> "???" and show_parens t = match t with | Arrow _ | Tuple _ -> "(" ^ show t ^ ")" | _ -> show t and show_list = function | [] -> failwith "show_list: empty" | [ x ] -> show x | x :: xs -> show x ^ ", " ^ show_list xs and show_tuple = function | [] -> failwith "show_tuple: empty" | [ x ] -> show_parens x | x :: xs -> show_parens x ^ " * " ^ show_tuple xs let size typ = typ |> show |> String.length let equal = Stdlib.( = ) let hash = Hashtbl.hash
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>