diff --git a/iter.opam b/iter.opam index 10c495a..81cb36f 100644 --- a/iter.opam +++ b/iter.opam @@ -11,12 +11,8 @@ build: [ ["dune" "runtest" "-p" name "-j" jobs] {with-test & arch != "arm32" & arch != "x86_32"} ] depends: [ - "base-bytes" - "result" - "seq" - "ocaml" { >= "4.03.0" } + "ocaml" { >= "4.08.0" } "dune" { >= "2.0" } - "dune-configurator" "qcheck-core" {with-test} "ounit2" {with-test} "mdx" {with-test & >= "1.3" } diff --git a/src/Iter.ml b/src/Iter.ml index 3d3642b..7e1d2ad 100644 --- a/src/Iter.ml +++ b/src/Iter.ml @@ -1,9 +1,5 @@ (* This file is free software, part of iter. See file "license" for more details. *) -(** {1 Simple and Efficient Iterators} *) - -open Iter_shims_ - type 'a t = ('a -> unit) -> unit (** Iter abstract iterator type *) diff --git a/src/bigarray/IterBigarray.ml b/src/bigarray/IterBigarray.ml index b6745d0..1ad0806 100644 --- a/src/bigarray/IterBigarray.ml +++ b/src/bigarray/IterBigarray.ml @@ -2,7 +2,8 @@ (** {1 Interface and Helpers for bigarrays} *) -open! IterBigarrayShims_ +let bigarray_map_file fd ty lay b len = + Unix.map_file fd ty lay b [| len |] |> Bigarray.array1_of_genarray let of_bigarray b yield = let len = Bigarray.Array1.dim b in diff --git a/src/bigarray/dune b/src/bigarray/dune index f867621..1924c28 100644 --- a/src/bigarray/dune +++ b/src/bigarray/dune @@ -2,19 +2,6 @@ (name iter_bigarray) (public_name iter.bigarray) (libraries iter bigarray unix) - (modules IterBigarray IterBigarrayShims_) + (modules IterBigarray) (wrapped false) (optional)) - -(executable - (name mkshims) - (modules mkshims) - (libraries dune.configurator)) - -(rule - (targets IterBigarrayShims_.ml) - (deps mkshims.exe) - (action - (with-stdout-to - %{targets} - (run ./mkshims.exe)))) diff --git a/src/bigarray/mkshims.ml b/src/bigarray/mkshims.ml deleted file mode 100644 index 80a7918..0000000 --- a/src/bigarray/mkshims.ml +++ /dev/null @@ -1,21 +0,0 @@ -module C = Configurator.V1 - -let shims_pre_408 = - "\nopen! Bigarray\nlet bigarray_map_file = Bigarray.Array1.map_file\n" - -let shims_post_408 = - "\n\ - let bigarray_map_file fd ty lay b len =\n\ - \ Unix.map_file fd ty lay b [| len |] |> Bigarray.array1_of_genarray\n" - -let () = - C.main ~name:"mkshims" (fun c -> - let version = C.ocaml_config_var_exn c "version" in - let major, minor = - Scanf.sscanf version "%u.%u" (fun maj min -> maj, min) - in - print_endline - (if (major, minor) >= (4, 8) then - shims_post_408 - else - shims_pre_408)) diff --git a/src/dune b/src/dune index b0c45eb..6c49399 100644 --- a/src/dune +++ b/src/dune @@ -1,21 +1,9 @@ -(executable - (name mkshims) - (modules mkshims) - (libraries dune.configurator)) - -(rule - (targets Iter_shims_.ml) - (deps mkshims.exe) - (action - (with-stdout-to - %{targets} - (run ./mkshims.exe)))) (library (name iter) (public_name iter) (wrapped false) - (modules Iter IterLabels Iter_shims_) + (modules Iter IterLabels) (flags :standard -w +a -warn-error -a+8 -nolabels) (libraries bytes result seq)) diff --git a/src/mkshims.ml b/src/mkshims.ml deleted file mode 100644 index c278783..0000000 --- a/src/mkshims.ml +++ /dev/null @@ -1,16 +0,0 @@ -module C = Configurator.V1 - -let shims_pre_408 = "module Stdlib = Pervasives" -let shims_post_408 = "module Stdlib = Stdlib" - -let () = - C.main ~name:"mkshims" (fun c -> - let version = C.ocaml_config_var_exn c "version" in - let major, minor = - Scanf.sscanf version "%u.%u" (fun maj min -> maj, min) - in - print_endline - (if (major, minor) >= (4, 8) then - shims_post_408 - else - shims_pre_408))