mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
fix: proper shims for CCArrayLabel too
This commit is contained in:
parent
d5e5b43e1f
commit
616c077880
3 changed files with 19 additions and 6 deletions
|
|
@ -16,10 +16,7 @@ type 'a printer = Format.formatter -> 'a -> unit
|
||||||
external make_float : int -> float array = "caml_make_float_vect" (* compat *)
|
external make_float : int -> float array = "caml_make_float_vect" (* compat *)
|
||||||
(**/**)
|
(**/**)
|
||||||
|
|
||||||
include module type of ArrayLabels
|
include module type of CCShimsArrayLabels_
|
||||||
|
|
||||||
type 'a t = 'a array
|
|
||||||
(** The type for arrays *)
|
|
||||||
|
|
||||||
val empty : 'a t
|
val empty : 'a t
|
||||||
(** [empty] is the empty array, physically equal to [||]. *)
|
(** [empty] is the empty array, physically equal to [||]. *)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,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)
|
CCShimsArray_.ml CCShimsFormat_.ml CCShimsMkLet_.ml CCShimsArrayLabels_.ml)
|
||||||
(deps ./mkshims.exe)
|
(deps ./mkshims.exe)
|
||||||
(action
|
(action
|
||||||
(run ./mkshims.exe)))
|
(run ./mkshims.exe)))
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,18 @@ let shims_list_post_408 = "include List"
|
||||||
|
|
||||||
let shims_array_pre_406 = "
|
let shims_array_pre_406 = "
|
||||||
include Array
|
include Array
|
||||||
module Floatarray = struct end
|
module Floatarray = struct type t = float array end
|
||||||
|
type 'a t = 'a array
|
||||||
|
"
|
||||||
|
|
||||||
|
let shims_array_label_pre_406 = "
|
||||||
|
include ArrayLabels
|
||||||
|
module Floatarray = struct type t = float array end
|
||||||
|
type 'a t = 'a array
|
||||||
|
"
|
||||||
|
|
||||||
|
let shims_array_label_406_408 = "
|
||||||
|
include ArrayLabels
|
||||||
type 'a t = 'a array
|
type 'a t = 'a array
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|
@ -85,6 +96,7 @@ let shims_array_406_408 = "
|
||||||
type 'a t = 'a array
|
type 'a t = 'a array
|
||||||
"
|
"
|
||||||
let shims_array_post_408 = "include Array"
|
let shims_array_post_408 = "include Array"
|
||||||
|
let shims_array_label_post_408 = "include ArrayLabels"
|
||||||
|
|
||||||
let shims_let_op_pre_408 =
|
let shims_let_op_pre_408 =
|
||||||
"
|
"
|
||||||
|
|
@ -148,6 +160,10 @@ let () =
|
||||||
(if (major, minor) >= (4,8) then shims_array_post_408
|
(if (major, minor) >= (4,8) then shims_array_post_408
|
||||||
else if (major, minor) >= (4,6) then shims_array_406_408
|
else if (major, minor) >= (4,6) then shims_array_406_408
|
||||||
else shims_array_pre_406);
|
else shims_array_pre_406);
|
||||||
|
write_file "CCShimsArrayLabels_.ml"
|
||||||
|
(if (major, minor) >= (4,8) then shims_array_label_post_408
|
||||||
|
else if (major, minor) >= (4,6) then shims_array_label_406_408
|
||||||
|
else shims_array_label_pre_406);
|
||||||
write_file "CCShimsFormat_.ml" (if (major, minor) >= (4,8) then shims_fmt_post_408 else shims_fmt_pre_408);
|
write_file "CCShimsFormat_.ml" (if (major, minor) >= (4,8) then shims_fmt_post_408 else shims_fmt_pre_408);
|
||||||
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);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue