mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
fix: rely on either compatibility library
This commit is contained in:
parent
b2cff1d0b7
commit
62ee8ad17e
4 changed files with 4 additions and 16 deletions
|
|
@ -7,7 +7,7 @@ type 'a printer = Format.formatter -> 'a -> unit
|
||||||
|
|
||||||
(** {2 Basics} *)
|
(** {2 Basics} *)
|
||||||
|
|
||||||
include CCShimsEither_
|
type ('a, 'b) t = ('a, 'b) Either.t = Left of 'a | Right of 'b
|
||||||
|
|
||||||
let left l = Left l
|
let left l = Left l
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,7 @@ type 'a printer = Format.formatter -> 'a -> unit
|
||||||
|
|
||||||
(** {2 Basics} *)
|
(** {2 Basics} *)
|
||||||
|
|
||||||
|
type ('a, 'b) t = ('a, 'b) Either.t = Left of 'a | Right of 'b
|
||||||
include module type of CCShimsEither_
|
|
||||||
|
|
||||||
val left : 'a -> ('a, 'b) t
|
val left : 'a -> ('a, 'b) t
|
||||||
(** [left l] is [Left l] *)
|
(** [left l] is [Left l] *)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
(rule
|
(rule
|
||||||
(targets CCShims_.ml CCShimsList_.ml CCShimsFun_.ml CCShimsFun_.mli
|
(targets CCShims_.ml CCShimsList_.ml CCShimsFun_.ml CCShimsFun_.mli
|
||||||
CCShimsArray_.ml CCShimsFormat_.ml CCShimsMkLet_.ml CCShimsMkLetList_.ml
|
CCShimsArray_.ml CCShimsFormat_.ml CCShimsMkLet_.ml CCShimsMkLetList_.ml
|
||||||
CCShimsArrayLabels_.ml CCShimsInt_.ml CCShimsEither_.ml)
|
CCShimsArrayLabels_.ml CCShimsInt_.ml)
|
||||||
(deps ./mkshims.exe)
|
(deps ./mkshims.exe)
|
||||||
(action
|
(action
|
||||||
(run ./mkshims.exe)))
|
(run ./mkshims.exe)))
|
||||||
|
|
@ -20,6 +20,6 @@
|
||||||
(flags :standard -warn-error -a+8 -w -32-67 -safe-string -nolabels -open
|
(flags :standard -warn-error -a+8 -w -32-67 -safe-string -nolabels -open
|
||||||
CCMonomorphic)
|
CCMonomorphic)
|
||||||
(ocamlopt_flags (:include ../flambda.flags))
|
(ocamlopt_flags (:include ../flambda.flags))
|
||||||
(libraries seq containers.monomorphic))
|
(libraries seq either containers.monomorphic))
|
||||||
|
|
||||||
(ocamllex (modules CCSexp_lex))
|
(ocamllex (modules CCSexp_lex))
|
||||||
|
|
|
||||||
|
|
@ -204,14 +204,6 @@ let shims_int_post_408 = "
|
||||||
(** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Int.html} Documentation for the standard Int module}*)
|
(** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Int.html} Documentation for the standard Int module}*)
|
||||||
"
|
"
|
||||||
|
|
||||||
let shims_either_pre_412 = "
|
|
||||||
type ('a, 'b) t = Left of 'a | Right of 'b
|
|
||||||
"
|
|
||||||
|
|
||||||
let shims_either_post_412 = "
|
|
||||||
type ('a, 'b) t = ('a, 'b) Either.t = Left of 'a | Right of 'b
|
|
||||||
"
|
|
||||||
|
|
||||||
let () =
|
let () =
|
||||||
C.main ~name:"mkshims" (fun c ->
|
C.main ~name:"mkshims" (fun c ->
|
||||||
let version = C.ocaml_config_var_exn c "version" in
|
let version = C.ocaml_config_var_exn c "version" in
|
||||||
|
|
@ -233,7 +225,4 @@ let () =
|
||||||
write_file "CCShimsMkLetList_.ml" (if (major, minor) >= (4,8) then shims_let_op_list_post_408 else shims_let_op_list_pre_408);
|
write_file "CCShimsMkLetList_.ml" (if (major, minor) >= (4,8) then shims_let_op_list_post_408 else shims_let_op_list_pre_408);
|
||||||
write_file "CCShimsInt_.ml"
|
write_file "CCShimsInt_.ml"
|
||||||
(if (major, minor) >= (4,8) then shims_int_post_408 else shims_int_pre_408);
|
(if (major, minor) >= (4,8) then shims_int_post_408 else shims_int_pre_408);
|
||||||
write_file "CCShimsEither_.ml"
|
|
||||||
(if (major, minor) >= (4,12) then shims_either_post_412
|
|
||||||
else shims_either_pre_412);
|
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue