chore(int): include module Int for ocaml >= 4.08

This commit is contained in:
Fardale 2020-05-17 00:11:04 +02:00
parent 8f5c7c8fe9
commit eaa421c62d
4 changed files with 10 additions and 1 deletions

View file

@ -3,6 +3,8 @@
open CCShims_ open CCShims_
include CCShimsInt_
type t = int type t = int
type 'a iter = ('a -> unit) -> unit type 'a iter = ('a -> unit) -> unit

View file

@ -3,6 +3,8 @@
(** {1 Basic Int functions} *) (** {1 Basic Int functions} *)
include module type of CCShimsInt_
type t = int type t = int
val zero : t val zero : t

View file

@ -6,7 +6,8 @@
(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 CCShimsArrayLabels_.ml) CCShimsArray_.ml CCShimsFormat_.ml CCShimsMkLet_.ml CCShimsArrayLabels_.ml
CCShimsInt_.ml)
(deps ./mkshims.exe) (deps ./mkshims.exe)
(action (action
(run ./mkshims.exe))) (run ./mkshims.exe)))

View file

@ -150,6 +150,9 @@ let shims_let_op_post_408 =
end[@@inline] end[@@inline]
" "
let shims_int_pre_408 = ""
let shims_int_post_408 = "include Int"
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
@ -168,4 +171,5 @@ let () =
write_file "CCShimsFun_.ml" (if (major, minor) >= (4,8) then shims_fun_post_408 else shims_fun_pre_408); write_file "CCShimsFun_.ml" (if (major, minor) >= (4,8) then shims_fun_post_408 else shims_fun_pre_408);
write_file "CCShimsFun_.mli" (if (major, minor) >= (4,8) then shims_fun_mli_post_408 else shims_fun_mli_pre_408); write_file "CCShimsFun_.mli" (if (major, minor) >= (4,8) then shims_fun_mli_post_408 else shims_fun_mli_pre_408);
write_file "CCShimsMkLet_.ml" (if (major, minor) >= (4,8) then shims_let_op_post_408 else shims_let_op_pre_408); write_file "CCShimsMkLet_.ml" (if (major, minor) >= (4,8) then shims_let_op_post_408 else shims_let_op_pre_408);
write_file "CCShimsInt_.ml" (if (major, minor) >= (4,8) then shims_int_post_408 else shims_int_pre_408);
) )