package grace
A fancy diagnostics library that allows your compilers to exit with grace
Install
Dune Dependency
Authors
Maintainers
Sources
grace-0.1.0.tbz
sha256=19576d3f32e4a69c7ebad26a801b568a2e3bff24a0e4d5ddf3b8bf4eac479d4c
sha512=436db3699126eec797da1be9f530759547804cc081ed365a75ba8ae9b053c05999ae820d294dd20f6a68e0712084579c585105a3855d71b459efc1367172bd66
doc/src/grace.rendering/import.ml.html
Source file import.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
include Core include Grace module Iter = IterLabels module Fmt = struct include Fmt let sp ppf () = Fmt.pf ppf " " let styled_multi style_multi t = List.fold_right style_multi ~init:t ~f:styled let with_style styles ppf t = styled_multi styles t ppf () let repeat ~width t ppf x = for _ = 1 to width do t ppf x done ;; let sps n ppf x = repeat ~width:n sp ppf x let newline ppf () = Fmt.pf ppf "@." end module List = struct include List let concat_map_with_next t ~f = let rec loop = function | [] -> [] | [ x ] -> f x ~next:None | x1 :: x2 :: t -> f x1 ~next:(Some x2) @ loop (x2 :: t) in loop t ;; let concat_map_with_next_and_prev t ~f = let rec loop t ~prev = match t with | [] -> [] | [ x ] -> f x ~prev ~next:None | x1 :: x2 :: t -> let t' = f x1 ~prev ~next:(Some x2) in t' @ loop (x2 :: t) ~prev:(last t') in loop t ~prev:None ;; end let invalid_argf fmt = Format.kasprintf invalid_arg fmt let sys_errorf fmt = Format.kasprintf (fun s -> raise (Sys_error s)) fmt
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>