Source file arrow_apply.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
101
102
103
104
105
106
107
108
109
110
module Core_over_category_and_via_arrow_and_fst
(Category : Preface_specs.CATEGORY)
(Req : Preface_specs.Arrow_apply.WITH_ARROW_AND_FST
with type ('a, 'b) t = ('a, 'b) Category.t) :
Preface_specs.Arrow_apply.CORE with type ('a, 'b) t = ('a, 'b) Req.t = struct
include Arrow.Core_over_category_and_via_arrow_and_fst (Category) (Req)
let apply = Req.apply
end
module Core_over_category_and_via_arrow_and_split
(Category : Preface_specs.CATEGORY)
(Req : Preface_specs.Arrow_apply.WITH_ARROW_AND_SPLIT
with type ('a, 'b) t = ('a, 'b) Category.t) :
Preface_specs.Arrow_apply.CORE with type ('a, 'b) t = ('a, 'b) Req.t = struct
include Arrow.Core_over_category_and_via_arrow_and_split (Category) (Req)
let apply = Req.apply
end
module Operation_over_category = Arrow.Operation_over_category
module Infix_over_category = Arrow.Infix_over_category
module Alias = Arrow.Alias
module Via
(Core : Preface_specs.Arrow_apply.CORE)
(Operation : Preface_specs.Arrow_apply.OPERATION
with type ('a, 'b) t = ('a, 'b) Core.t)
(Alias : Preface_specs.Arrow_apply.ALIAS
with type ('a, 'b) t = ('a, 'b) Operation.t)
(Infix : Preface_specs.Arrow_apply.INFIX
with type ('a, 'b) t = ('a, 'b) Alias.t) :
Preface_specs.ARROW_APPLY with type ('a, 'b) t = ('a, 'b) Infix.t = struct
include Core
include Operation
include Alias
include Infix
module Infix = Infix
end
module Over_category_and_via_arrow_and_fst
(Category : Preface_specs.CATEGORY)
(Req : Preface_specs.Arrow_apply.WITH_ARROW_AND_FST
with type ('a, 'b) t = ('a, 'b) Category.t) :
Preface_specs.ARROW_APPLY with type ('a, 'b) t = ('a, 'b) Req.t = struct
module Core = Core_over_category_and_via_arrow_and_fst (Category) (Req)
module Operation = Operation_over_category (Category) (Core)
module Alias = Alias (Operation)
module Infix = Infix_over_category (Category) (Core) (Operation)
include Core
include Operation
include Alias
include Infix
end
module Over_category_and_via_arrow_and_split
(Category : Preface_specs.CATEGORY)
(Req : Preface_specs.Arrow_apply.WITH_ARROW_AND_SPLIT
with type ('a, 'b) t = ('a, 'b) Category.t) :
Preface_specs.ARROW_APPLY with type ('a, 'b) t = ('a, 'b) Req.t = struct
module Core = Core_over_category_and_via_arrow_and_split (Category) (Req)
module Operation = Operation_over_category (Category) (Core)
module Alias = Alias (Operation)
module Infix = Infix_over_category (Category) (Core) (Operation)
include Core
include Operation
include Alias
include Infix
end
module Over_arrow
(Arrow : Preface_specs.ARROW)
(Apply : Preface_specs.Arrow_apply.WITH_APPLY
with type ('a, 'b) t = ('a, 'b) Arrow.t) :
Preface_specs.ARROW_APPLY with type ('a, 'b) t = ('a, 'b) Apply.t = struct
module Core_aux =
Core_over_category_and_via_arrow_and_fst
(Arrow)
(struct
include Arrow
include Apply
end)
module Operation_aux = Operation_over_category (Arrow) (Core_aux)
module Infix_aux = Infix_over_category (Arrow) (Core_aux) (Operation_aux)
include Core_aux
include Operation_aux
include Arrow
module Infix = struct
include Arrow.Infix
include Infix_aux
end
include Infix
end
module From_monad (Monad : Preface_specs.Monad.CORE) :
Preface_specs.ARROW_APPLY with type ('a, 'b) t = 'a -> 'b Monad.t = struct
module Arr = Arrow.From_monad (Monad)
include
Over_arrow
(Arr)
(struct
type ('a, 'b) t = 'a -> 'b Monad.t
let apply (f, x) = f x
end)
end