package mirage
The MirageOS library operating system
Install
Dune Dependency
Authors
Maintainers
Sources
mirage-4.7.0.tbz
sha256=ade8c410b2de3997c4a513f53f6c990dac6af508161e20df01b64fa7975ca5be
sha512=42fddf09be84c4251417145b88d4f63b41db1b29c9622b2b4e4508e31146f227a16875e670da96251208745f79a42f0b7d2bd8b44b883a705381b4c97a4255b8
doc/src/mirage.devices/misc.ml.html
Source file misc.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
let get_target i = Key.(get (Functoria.Info.context i) target) let connect_err name ?max number = let str = match max with | None -> Fmt.str "The %s connect expects exactly %d argument%s" name number (if number = 1 then "" else "s") | Some n -> Fmt.str "The %s connect expects between %d and %d arguments" name number n in failwith str let pop ~err x rest = match (rest, x) with | h :: t, Some _ -> (Some h, t) | _, None -> (None, rest) | _ -> err () let pop_and_check_empty ~err x rest = let result, rest = pop ~err x rest in match rest with [] -> result | _ -> fst (err ()) let pp_opt name ppf = function | None -> () | Some key -> Fmt.pf ppf "@ ?%s:%s" name key let pp_label name ppf = function | None -> () | Some key -> Fmt.pf ppf "@ ~%s:%s" name key let terminal () = let dumb = try Sys.getenv "TERM" = "dumb" with Not_found -> true in let isatty = try Unix.(isatty (descr_of_out_channel Stdlib.stdout)) with Unix.Unix_error _ -> false in (not dumb) && isatty module K = struct type t = [] | ( :: ) : 'a Runtime_arg.arg option * t -> t end let runtime_args_opt l = let rec aux acc = function | K.[] -> List.rev acc | K.(None :: t) -> aux acc t | K.(Some h :: t) -> aux (Runtime_arg.v h :: acc) t in aux [] l
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>