fix: rely on either compatibility library

This commit is contained in:
Simon Cruanes 2021-10-24 22:56:36 -04:00
parent b2cff1d0b7
commit 62ee8ad17e
No known key found for this signature in database
GPG key ID: 4AC01D0849AA62B6
4 changed files with 4 additions and 16 deletions

View file

@ -7,7 +7,7 @@ type 'a printer = Format.formatter -> 'a -> unit
(** {2 Basics} *)
include CCShimsEither_
type ('a, 'b) t = ('a, 'b) Either.t = Left of 'a | Right of 'b
let left l = Left l

View file

@ -15,8 +15,7 @@ type 'a printer = Format.formatter -> 'a -> unit
(** {2 Basics} *)
include module type of CCShimsEither_
type ('a, 'b) t = ('a, 'b) Either.t = Left of 'a | Right of 'b
val left : 'a -> ('a, 'b) t
(** [left l] is [Left l] *)

View file

@ -7,7 +7,7 @@
(rule
(targets CCShims_.ml CCShimsList_.ml CCShimsFun_.ml CCShimsFun_.mli
CCShimsArray_.ml CCShimsFormat_.ml CCShimsMkLet_.ml CCShimsMkLetList_.ml
CCShimsArrayLabels_.ml CCShimsInt_.ml CCShimsEither_.ml)
CCShimsArrayLabels_.ml CCShimsInt_.ml)
(deps ./mkshims.exe)
(action
(run ./mkshims.exe)))
@ -20,6 +20,6 @@
(flags :standard -warn-error -a+8 -w -32-67 -safe-string -nolabels -open
CCMonomorphic)
(ocamlopt_flags (:include ../flambda.flags))
(libraries seq containers.monomorphic))
(libraries seq either containers.monomorphic))
(ocamllex (modules CCSexp_lex))

View file

@ -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}*)
"
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 () =
C.main ~name:"mkshims" (fun c ->
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 "CCShimsInt_.ml"
(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);
)