package async_log
Logging library built on top of Async_unix
Install
Dune Dependency
Authors
Maintainers
Sources
v0.17.0.tar.gz
sha256=2dae248d74c23aa6a1e0bc38d5b34c975eb4dfbdf32f0970641b5befd8385720
doc/src/async_log.kernel/versioned.ml.html
Source file versioned.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 52 53 54
module Stable = struct open Core.Core_stable module Version = struct type t = V2 [@@deriving bin_io, sexp, compare] let%expect_test "bin_digest Message.Version.V2" = print_endline [%bin_digest: t]; [%expect {| 6ae8dff060dc8c96585060b4f76d2974 |}] ;; let ( <> ) t1 t2 = compare t1 t2 <> 0 let to_string t = Core.Sexp.to_string (sexp_of_t t) end module Make (T : Versioned_intf.S with type version := Version.t) = struct module Versioned = struct type 'a t = Version.t * 'a T.t [@@deriving bin_io, sexp] end let of_versioned (version, t) = if Version.( <> ) version T.version then Core.failwithf !"version mismatch %{Version} <> to expected version %{Version}" version T.version () else t ;; type 'time t = 'time T.t include Sexpable.Of_sexpable1.V1 (Versioned) (struct type nonrec 'time t = 'time T.t let to_sexpable t = T.version, t let of_sexpable = of_versioned end) include Binable.Of_binable1.V1 [@alert "-legacy"] (Versioned) (struct type 'time t = 'time T.t let to_binable t = T.version, t let of_binable = of_versioned end) end end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>