From 2dbeea14fe63bc475b21f82720da0ee79f95d491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gr=C3=BCnewald?= Date: Sat, 10 Oct 2015 17:23:14 +0200 Subject: [PATCH 1/5] Add version information to the opam file --- opam/opam | 1 + 1 file changed, 1 insertion(+) diff --git a/opam/opam b/opam/opam index 23f2909..62704f2 100644 --- a/opam/opam +++ b/opam/opam @@ -1,6 +1,7 @@ opam-version: "1.2" maintainer: "michipili@gmail.com" authors: "Michael Grünewald" +version: "0.3.0-current" license: "CeCILL-B" homepage: "https://github.com/michipili/lemonade" bug-reports: "https://github.com/michipili/lemonade/issues" From 4d0d60d471c37db80c805dfd7f4695e7ee8ed170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gr=C3=BCnewald?= Date: Thu, 12 Nov 2015 19:24:21 +0100 Subject: [PATCH 2/5] Update installation instructions --- README.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 66 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 665641c..60b993f 100644 --- a/README.md +++ b/README.md @@ -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 From b8ac0a52bedb27f5d132477fe63b24823cb78661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gr=C3=BCnewald?= Date: Thu, 12 Nov 2015 19:33:58 +0100 Subject: [PATCH 3/5] Run Travis CI against the selected compiler --- Library/Ancillary/travisci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Ancillary/travisci b/Library/Ancillary/travisci index e23cde7..562a87e 100755 --- a/Library/Ancillary/travisci +++ b/Library/Ancillary/travisci @@ -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 From 60cd2a1c720ec158fe80880057ef1df758c06126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gr=C3=BCnewald?= Date: Thu, 12 Nov 2015 20:15:21 +0100 Subject: [PATCH 4/5] Followup mixture changes --- opam/opam | 2 +- src/lemonade_Type.ml | 1 + src/lemonade_Type.mli | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/opam/opam b/opam/opam index 62704f2..bd74314 100644 --- a/opam/opam +++ b/opam/opam @@ -26,7 +26,7 @@ remove: [ depends: [ "broken" {>= "0.4.2"} "bsdowl" {>= "3.0.0"} - "mixture"{>= "0.2.0"} + "mixture"{>= "0.2.1"} "ocamlfind" ] depexts: [ diff --git a/src/lemonade_Type.ml b/src/lemonade_Type.ml index 1c79281..49cd07e 100644 --- a/src/lemonade_Type.ml +++ b/src/lemonade_Type.ml @@ -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) diff --git a/src/lemonade_Type.mli b/src/lemonade_Type.mli index f2f71e3..842c89d 100644 --- a/src/lemonade_Type.mli +++ b/src/lemonade_Type.mli @@ -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. *) From a09e1b365482fe241860bf1a83718ff7c6757e9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gr=C3=BCnewald?= Date: Thu, 12 Nov 2015 20:16:29 +0100 Subject: [PATCH 5/5] Start the 0.3.1 release cycle --- Makefile | 2 +- opam/opam | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b6ec598..46dee92 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt PACKAGE= lemonade -VERSION= 0.3.0-current +VERSION= 0.3.1-releng OFFICER= michipili@gmail.com MODULE= ocaml.lib:src diff --git a/opam/opam b/opam/opam index bd74314..8ebffcf 100644 --- a/opam/opam +++ b/opam/opam @@ -1,7 +1,7 @@ opam-version: "1.2" maintainer: "michipili@gmail.com" authors: "Michael Grünewald" -version: "0.3.0-current" +version: "0.3.1-releng" license: "CeCILL-B" homepage: "https://github.com/michipili/lemonade" bug-reports: "https://github.com/michipili/lemonade/issues"