package alba

  1. Overview
  2. Docs
Alba compiler

Install

Dune Dependency

Authors

Maintainers

Sources

0.4.1.tar.gz
sha256=439b1dce07c86e914d1ebf1712c5581418314b0c8d13594f27a698b1d25fe272
md5=5cf58d4ed4eacbe6f330e9d2378ef5c6

doc/src/alba.fmlib/module_types.ml.html

Source file module_types.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
module type ANY =
  sig
    type t
  end



module type SORTABLE =
  sig
    type t
    val compare: t -> t -> int
  end



module type FUNCTOR =
  sig
    type 'a t
    val return: 'a -> 'a t
    val map:    ('a -> 'b) -> 'a t -> 'b t
  end

module type APPLICATIVE =
  sig
    type 'a t
    val return: 'a -> 'a t
    val map:    ('a -> 'b) -> 'a t -> 'b t
    val (<*>):  ('a -> 'b) t -> 'a t -> 'b t
  end


module type MONAD =
  sig
    type 'a t
    val return: 'a -> 'a t
    val (>>=):  'a t -> ('a -> 'b t) -> 'b t
    val (>=>):  ('a -> 'b t) -> ('b -> 'c t) -> ('a -> 'c t)
    val map:  ('a -> 'b) -> 'a t -> 'b t
    val join: 'a t t -> 'a t
    val (<*>): ('a -> 'b) t -> 'a t -> 'b t
  end


module type READABLE =
  sig
    type t
    val has_more: t -> bool
    val peek: t -> char
    val advance: t -> t
  end




module type WRITABLE =
  sig
    type t
    val needs_more: t -> bool
    val putc: t -> char ->  t
    val putend: t -> t
  end
OCaml

Innovation. Community. Security.