mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -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 *)
|
||||
(**/**)
|
||||
|
||||
include module type of ArrayLabels
|
||||
|
||||
type 'a t = 'a array
|
||||
(** The type for arrays *)
|
||||
include module type of CCShimsArrayLabels_
|
||||
|
||||
val empty : 'a t
|
||||
(** [empty] is the empty array, physically equal to [||]. *)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
(rule
|
||||
(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)
|
||||
(action
|
||||
(run ./mkshims.exe)))
|
||||
|
|
|
|||
|
|
@ -76,7 +76,18 @@ let shims_list_post_408 = "include List"
|
|||
|
||||
let shims_array_pre_406 = "
|
||||
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
|
||||
"
|
||||
|
||||
|
|
@ -85,6 +96,7 @@ let shims_array_406_408 = "
|
|||
type 'a t = 'a array
|
||||
"
|
||||
let shims_array_post_408 = "include Array"
|
||||
let shims_array_label_post_408 = "include ArrayLabels"
|
||||
|
||||
let shims_let_op_pre_408 =
|
||||
"
|
||||
|
|
@ -148,6 +160,10 @@ let () =
|
|||
(if (major, minor) >= (4,8) then shims_array_post_408
|
||||
else if (major, minor) >= (4,6) then shims_array_406_408
|
||||
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 "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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue