From 8419f8a4d3128d332529bc73e4f8f28a5fe734e2 Mon Sep 17 00:00:00 2001 From: Jeremie Dimino Date: Wed, 18 Mar 2020 12:01:12 +0000 Subject: [PATCH] Fix compat with OCaml 4.04 Signed-off-by: Jeremie Dimino --- CHANGES.md | 5 +++++ Makefile | 3 +++ dune-workspace.dev | 4 ++++ src/pp.ml | 4 ++-- test/tests.ml | 6 ++++-- 5 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 dune-workspace.dev diff --git a/CHANGES.md b/CHANGES.md index 5abef64..c07ebee 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +1.0.1 +----- + +- Fix compat with OCaml 4.04 + 1.0.0 ----- diff --git a/Makefile b/Makefile index b3f6fce..3417e11 100644 --- a/Makefile +++ b/Makefile @@ -17,4 +17,7 @@ reinstall: uninstall install clean: dune clean +all-supported-ocaml-versions: + dune runtest --workspace dune-workspace.dev + .PHONY: default install uninstall reinstall clean test diff --git a/dune-workspace.dev b/dune-workspace.dev new file mode 100644 index 0000000..d385721 --- /dev/null +++ b/dune-workspace.dev @@ -0,0 +1,4 @@ +(lang dune 1.0) + +;; This file is used by `make all-supported-ocaml-versions` +(context (opam (switch 4.04.2))) diff --git a/src/pp.ml b/src/pp.ml index 96cc7ec..a8398d7 100644 --- a/src/pp.ml +++ b/src/pp.ml @@ -1,5 +1,5 @@ -module List = Stdlib.ListLabels -module String = Stdlib.StringLabels +module List = ListLabels +module String = StringLabels type +'a t = | Nop diff --git a/test/tests.ml b/test/tests.ml index 8ad52ee..a04fbc8 100644 --- a/test/tests.ml +++ b/test/tests.ml @@ -163,7 +163,8 @@ let%expect_test _ = ++ Pp.cut ++ Pp.box (Pp.text "Here are a few things you can do:") ++ Pp.cut - ++ Pp.enumerate ~f:Fun.id + ++ Pp.enumerate + ~f:(fun x -> x) [ Pp.text "read the documentation, double check the way you are using \ this software to make sure you are not doing something wrong, \ @@ -180,7 +181,8 @@ let%expect_test _ = ; "clear your head and try again" ] ] )); - [%expect {| + [%expect + {| Error: something went wrong! Here are a few things you can do: - read the documentation, double check the way you are using this software to