package accessor

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file applicative_without_return_intf.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
open! Base
open! Import

module type Basic3 = sig
  type ('a, 'd, 'e) t

  val apply : ('a -> 'b, 'd, 'e) t -> ('a, 'd, 'e) t -> ('b, 'd, 'e) t
  val map : ('a, 'd, 'e) t -> f:('a -> 'b) -> ('b, 'd, 'e) t
end

module type Basic2 = sig
  type ('a, 'e) t

  include Basic3 with type ('a, _, 'e) t := ('a, 'e) t
end

module type Basic = sig
  type 'a t

  include Basic2 with type ('a, _) t := 'a t
end

module type S3_without_let_syntax = sig
  type ('a, 'd, 'e) t

  val apply : ('a -> 'b, 'd, 'e) t -> ('a, 'd, 'e) t -> ('b, 'd, 'e) t
  val map : ('a, 'd, 'e) t -> f:('a -> 'b) -> ('b, 'd, 'e) t
  val map2 : ('a, 'd, 'e) t -> ('b, 'd, 'e) t -> f:('a -> 'b -> 'c) -> ('c, 'd, 'e) t

  val map3
    :  ('a, 'd, 'e) t
    -> ('b, 'd, 'e) t
    -> ('c, 'd, 'e) t
    -> f:('a -> 'b -> 'c -> 'f)
    -> ('f, 'd, 'e) t

  val both : ('a, 'd, 'e) t -> ('b, 'd, 'e) t -> ('a * 'b, 'd, 'e) t

  module Applicative_infix : sig
    val ( <*> ) : ('a -> 'b, 'd, 'e) t -> ('a, 'd, 'e) t -> ('b, 'd, 'e) t
    val ( >>| ) : ('a, 'd, 'e) t -> ('a -> 'b) -> ('b, 'd, 'e) t
  end

  include module type of Applicative_infix
end

module type S2_without_let_syntax = sig
  type ('a, 'e) t

  include S3_without_let_syntax with type ('a, _, 'e) t := ('a, 'e) t
end

module type S_without_let_syntax = sig
  type 'a t

  include S2_without_let_syntax with type ('a, _) t := 'a t
end

module type S3 = sig
  include S3_without_let_syntax

  module Let_syntax : sig
    include module type of Applicative_infix

    module Let_syntax : sig
      val map : ('a, 'd, 'e) t -> f:('a -> 'b) -> ('b, 'd, 'e) t
      val both : ('a, 'd, 'e) t -> ('b, 'd, 'e) t -> ('a * 'b, 'd, 'e) t

      module Open_on_rhs : sig end
    end
  end
end

module type S2 = sig
  type ('a, 'e) t

  include S3 with type ('a, _, 'e) t := ('a, 'e) t
end

module type S = sig
  type 'a t

  include S2 with type ('a, _) t := 'a t
end

module type Applicative_without_return = sig
  module type Basic = Basic
  module type Basic2 = Basic2
  module type Basic3 = Basic3
  module type S_without_let_syntax = S_without_let_syntax
  module type S2_without_let_syntax = S2_without_let_syntax
  module type S3_without_let_syntax = S3_without_let_syntax
  module type S = S
  module type S2 = S2
  module type S3 = S3

  module Make (B : Basic) : S with type 'a t := 'a B.t
  module Make2 (B : Basic2) : S2 with type ('a, 'e) t := ('a, 'e) B.t
  module Make3 (B : Basic3) : S3 with type ('a, 'd, 'e) t := ('a, 'd, 'e) B.t
end