package hl_yaml

  1. Overview
  2. Docs

Source file s.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
module type S_Lwt = sig
  type +'a t

  val return : 'a -> 'a t

  val map : ('a -> 'b) -> 'a t -> 'b t

  val bind : 'a t -> ('a -> 'b t) -> 'b t

  val apply : ('a -> 'b t) -> 'a -> 'b t

  val catch : (unit -> 'a t) -> (exn -> 'a t) -> 'a t
end

module type S_Lwt_io = sig
  type +'a lwt_t

  type input

  type output

  type 'a mode =
    | Input : input mode
    | Output : output mode

  type 'a channel

  type input_channel = input channel

  val with_file :
    ?buffer:(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t ->
    ?flags:Unix.open_flag list ->
    ?perm:int ->
    mode:'a mode ->
    string ->
    ('a channel -> 'b lwt_t) ->
    'b lwt_t

  val read : ?count:int -> input_channel -> string lwt_t
end

module type S_Eio = sig
  module Path : sig
    type 'a t constraint 'a = [> `Dir ]

    val load : 'a t -> string

    val ( / ) : 'a t -> string -> 'a t
  end
end

module type IO = sig
  type +'a t

  type filepath

  val return : 'a -> 'a t

  val map : ('a -> 'b) -> 'a t -> 'b t

  val bind : 'a t -> ('a -> 'b t) -> 'b t

  val catch : (unit -> 'a t) -> (exn -> 'a t) -> 'a t

  val map_s : ('a -> 'b t) -> 'a list -> 'b list t

  val read_file : filepath -> string t
end
OCaml

Innovation. Community. Security.