-
Notifications
You must be signed in to change notification settings - Fork 29
/
check_stdlib.ml
24 lines (20 loc) · 914 Bytes
/
check_stdlib.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
(* check compatibility of interfaces *)
#directory "src";;
#load "extLib.cma";;
module XS = (struct
include ExtLib.String
external length : string -> int = "%string_length"
external get : string -> int -> char = "%string_safe_get"
external set : bytes -> int -> char -> unit = "%string_safe_set"
external create : int -> bytes = "caml_create_string"
external unsafe_set : bytes -> int -> char -> unit = "%string_unsafe_set"
external unsafe_blit : string -> int -> bytes -> int -> int -> unit = "caml_blit_string" [@@noalloc]
external unsafe_fill : bytes -> int -> int -> char -> unit = "caml_fill_string" [@@noalloc]
end : module type of String)
module XL = (struct
include ExtLib.List
let sort = List.sort
end : module type of List)
module XA = (ExtLib.Array : module type of Array)
module XB = (ExtLib.Buffer : module type of Buffer)
module XH = (ExtLib.Hashtbl : module type of Hashtbl)