package sherlodoc
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.1.tbz
sha256=d45eb125514839fd9ac27702bb4938d1b4f3b6978e9b16ab9673ea067245affc
sha512=3555386b4770a7caa8ec903683bde5ecdc41d5e57ffaee617d5da225c747bbd1e9c1d2677f4df97e96bbdfc69f580ea83b1b92b933ea40a436a658788b677bbc
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 42type 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)"
>