Skip to content

Commit ccd6116

Browse files
Lemonade 0.3.1
2 parents 4107e28 + a09e1b3 commit ccd6116

File tree

6 files changed

+74
-7
lines changed

6 files changed

+74
-7
lines changed

Library/Ancillary/travisci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
INSTALL_PREFIX="${HOME}/.local"
1717

18-
eval $(opam config env)
18+
eval $(opam config env --switch ${TRAVIS_OCAML_VERSION:?})
1919
autoconf
2020
./configure --prefix="${INSTALL_PREFIX}"
2121
bmake -I "${INSTALL_PREFIX}/share/bsdowl" all

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
1313

1414
PACKAGE= lemonade
15-
VERSION= 0.3.0
15+
VERSION= 0.3.1
1616
OFFICER= michipili@gmail.com
1717

1818
MODULE= ocaml.lib:src

README.md

Lines changed: 66 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,69 @@ monad library for OCaml.
77

88
It implements the following monads:
99

10-
- `Lemonade_Lazy`
11-
- `Lemonade_List`
12-
- `Lemonade_Maybe`
13-
- `Lemonade_Success`
10+
- **Lemonade_Continuation** for continuation passing style programming.
11+
- **Lemonade_Lazy** for lazy computations.
12+
- **Lemonade_List** for computations yielding several possible results.
13+
- **Lemonade_Maybe** for computations yielding zero or one result.
14+
- **Lemonade_Reader** for computations explicitly depending on some environment.
15+
- **Lemonade_Retry** for retryable computations.
16+
- **Lemonade_State** for computations modifying a state.
17+
- **Lemonade_Success** for computations failing with context information.
18+
- **Lemonade_Writer** for computations writing a log book.
19+
20+
21+
## Setup guide
22+
23+
It is easy to install **Lemonade** using **opam** and its *pinning*
24+
feature. In a shell visiting the repository, say
25+
26+
```console
27+
% autoconf
28+
% opam pin add lemonade .
29+
```
30+
31+
It is also possible to install **Lemonade** manually.
32+
The installation procedure is based on the portable build system
33+
[BSD Owl Scripts][bsdowl-home] written for BSD Make.
34+
35+
1. Verify that prerequisites are installed:
36+
- BSD Make
37+
- [BSD OWl][bsdowl-install]
38+
- OCaml
39+
- [Broken][broken-home]
40+
- [Mixture][mixture-home]
41+
- GNU Autoconf
42+
43+
2. Get the source, either by cloning the repository or by exploding a
44+
[distribution tarball](releases).
45+
46+
3. Optionally run `autoconf` to produce a configuration script. This
47+
is only required if the script is not already present.
48+
49+
4. Run `./configure`, you can choose the installation prefix with
50+
`--prefix`.
51+
52+
5. Run `make build`.
53+
54+
6. Optionally run `make test` to test your build.
55+
56+
7. Finally run `make install`.
57+
58+
Depending on how **BSD Make** is called on your system, you may need to
59+
replace `make` by `bsdmake` or `bmake` in steps 5, 6, and 7.
60+
The **GNU Make** program usually give up the ghost, croaking
61+
`*** missing separator. Stop.` when you mistakingly use it instead of
62+
**BSD Make**.
63+
64+
Step 7 requires that you can `su -` if you are not already `root`.
65+
66+
67+
Michael Grünewald in Aachen, on November 12, 2015
68+
69+
[licence-url]: http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
70+
[licence-en]: COPYING
71+
[licence-fr]: COPYING-FR
72+
[bsdowl-home]: https://github.com/michipili/bsdowl
73+
[bsdowl-install]: https://github.com/michipili/bsdowl/wiki/Install
74+
[broken-home]: https://github.com/michipili/broken
75+
[mixture-home]: https://github.com/michipili/mixture

opam/opam

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
opam-version: "1.2"
22
maintainer: "michipili@gmail.com"
33
authors: "Michael Grünewald"
4+
version: "0.3.1"
45
license: "CeCILL-B"
56
homepage: "https://github.com/michipili/lemonade"
67
bug-reports: "https://github.com/michipili/lemonade/issues"
@@ -25,7 +26,7 @@ remove: [
2526
depends: [
2627
"broken" {>= "0.4.2"}
2728
"bsdowl" {>= "3.0.0"}
28-
"mixture"{>= "0.2.0"}
29+
"mixture"{>= "0.2.1"}
2930
"ocamlfind"
3031
]
3132
depexts: [

src/lemonade_Type.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ sig
3636
val ( <* ) : 'a t -> 'b t -> 'a t
3737
val ( >* ) : 'a t -> 'b t -> 'b t
3838
val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t
39+
val ( >|= ) : 'a t -> ('a -> 'b) -> 'b t
3940
val ( >> ) : 'a t -> (unit -> 'b t) -> 'b t
4041
val ( >=> ) : ('a -> 'b t) -> ('b -> 'c t) -> ('a -> 'c t)
4142
val ( <=< ) : ('b -> 'c t) -> ('a -> 'b t) -> ('a -> 'c t)

src/lemonade_Type.mli

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ sig
8888
val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t
8989
(** [ m >>= f] is equivalent to [bind m f]. *)
9090

91+
val ( >|= ) : 'a t -> ('a -> 'b) -> 'b t
92+
(** A composable shorthand for [map]. *)
93+
9194
val ( >> ) : 'a t -> (unit -> 'b t) -> 'b t
9295
(** [m >> f] binds [m] to [f], a context function. *)
9396

0 commit comments

Comments
 (0)