package async_log

  1. Overview
  2. Docs
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/sexp_or_string.ml.html

Source file sexp_or_string.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module Stable = struct
  open Core.Core_stable

  module V1 = struct
    type t =
      [ `Sexp of Sexp.V1.t
      | `String of string
      ]
    [@@deriving bin_io, sexp]

    let%expect_test "bin_digest Sexp_or_string.V1" =
      print_endline [%bin_digest: t];
      [%expect {| 7604679c48980b04476c108e66cf67c8 |}]
    ;;

    let to_string = function
      | `Sexp sexp -> Core.Sexp.to_string sexp
      | `String str -> str
    ;;
  end
end

type t = Stable.V1.t [@@deriving sexp_of]
OCaml

Innovation. Community. Security.