Skip to content

Commit

Permalink
Lemonade 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
foretspaisibles committed Nov 12, 2015
2 parents 4107e28 + a09e1b3 commit ccd6116
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Library/Ancillary/travisci
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

INSTALL_PREFIX="${HOME}/.local"

eval $(opam config env)
eval $(opam config env --switch ${TRAVIS_OCAML_VERSION:?})
autoconf
./configure --prefix="${INSTALL_PREFIX}"
bmake -I "${INSTALL_PREFIX}/share/bsdowl" all
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt

PACKAGE= lemonade
VERSION= 0.3.0
VERSION= 0.3.1
OFFICER= [email protected]

MODULE= ocaml.lib:src
Expand Down
70 changes: 66 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,69 @@ monad library for OCaml.

It implements the following monads:

- `Lemonade_Lazy`
- `Lemonade_List`
- `Lemonade_Maybe`
- `Lemonade_Success`
- **Lemonade_Continuation** for continuation passing style programming.
- **Lemonade_Lazy** for lazy computations.
- **Lemonade_List** for computations yielding several possible results.
- **Lemonade_Maybe** for computations yielding zero or one result.
- **Lemonade_Reader** for computations explicitly depending on some environment.
- **Lemonade_Retry** for retryable computations.
- **Lemonade_State** for computations modifying a state.
- **Lemonade_Success** for computations failing with context information.
- **Lemonade_Writer** for computations writing a log book.


## Setup guide

It is easy to install **Lemonade** using **opam** and its *pinning*
feature. In a shell visiting the repository, say

```console
% autoconf
% opam pin add lemonade .
```

It is also possible to install **Lemonade** manually.
The installation procedure is based on the portable build system
[BSD Owl Scripts][bsdowl-home] written for BSD Make.

1. Verify that prerequisites are installed:
- BSD Make
- [BSD OWl][bsdowl-install]
- OCaml
- [Broken][broken-home]
- [Mixture][mixture-home]
- GNU Autoconf

2. Get the source, either by cloning the repository or by exploding a
[distribution tarball](releases).

3. Optionally run `autoconf` to produce a configuration script. This
is only required if the script is not already present.

4. Run `./configure`, you can choose the installation prefix with
`--prefix`.

5. Run `make build`.

6. Optionally run `make test` to test your build.

7. Finally run `make install`.

Depending on how **BSD Make** is called on your system, you may need to
replace `make` by `bsdmake` or `bmake` in steps 5, 6, and 7.
The **GNU Make** program usually give up the ghost, croaking
`*** missing separator. Stop.` when you mistakingly use it instead of
**BSD Make**.

Step 7 requires that you can `su -` if you are not already `root`.


Michael Grünewald in Aachen, on November 12, 2015

[licence-url]: http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
[licence-en]: COPYING
[licence-fr]: COPYING-FR
[bsdowl-home]: https://github.com/michipili/bsdowl
[bsdowl-install]: https://github.com/michipili/bsdowl/wiki/Install
[broken-home]: https://github.com/michipili/broken
[mixture-home]: https://github.com/michipili/mixture
3 changes: 2 additions & 1 deletion opam/opam
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
opam-version: "1.2"
maintainer: "[email protected]"
authors: "Michael Grünewald"
version: "0.3.1"
license: "CeCILL-B"
homepage: "https://github.com/michipili/lemonade"
bug-reports: "https://github.com/michipili/lemonade/issues"
Expand All @@ -25,7 +26,7 @@ remove: [
depends: [
"broken" {>= "0.4.2"}
"bsdowl" {>= "3.0.0"}
"mixture"{>= "0.2.0"}
"mixture"{>= "0.2.1"}
"ocamlfind"
]
depexts: [
Expand Down
1 change: 1 addition & 0 deletions src/lemonade_Type.ml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ sig
val ( <* ) : 'a t -> 'b t -> 'a t
val ( >* ) : 'a t -> 'b t -> 'b t
val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t
val ( >|= ) : 'a t -> ('a -> 'b) -> 'b t
val ( >> ) : 'a t -> (unit -> 'b t) -> 'b t
val ( >=> ) : ('a -> 'b t) -> ('b -> 'c t) -> ('a -> 'c t)
val ( <=< ) : ('b -> 'c t) -> ('a -> 'b t) -> ('a -> 'c t)
Expand Down
3 changes: 3 additions & 0 deletions src/lemonade_Type.mli
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ sig
val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t
(** [ m >>= f] is equivalent to [bind m f]. *)

val ( >|= ) : 'a t -> ('a -> 'b) -> 'b t
(** A composable shorthand for [map]. *)

val ( >> ) : 'a t -> (unit -> 'b t) -> 'b t
(** [m >> f] binds [m] to [f], a context function. *)

Expand Down

0 comments on commit ccd6116

Please sign in to comment.