|
|
@ -7,32 +7,6 @@
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
*)
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
|
|
module Arg = Core.Std.Arg
|
|
|
|
|
|
|
|
module Array = Core.Std.Array
|
|
|
|
|
|
|
|
module Bool = Core.Std.Bool
|
|
|
|
|
|
|
|
module Bytes = Core.Std.Bytes
|
|
|
|
|
|
|
|
module Caml = Core.Std.Caml
|
|
|
|
|
|
|
|
module Char = Core.Std.Char
|
|
|
|
|
|
|
|
module Exn = Core.Std.Exn
|
|
|
|
|
|
|
|
module Filename = Core.Std.Filename
|
|
|
|
|
|
|
|
module Fn = Core.Std.Fn
|
|
|
|
|
|
|
|
module Gc = Core.Std.Gc
|
|
|
|
|
|
|
|
module In_channel = Core.Std.In_channel
|
|
|
|
|
|
|
|
module Int = Core.Std.Int
|
|
|
|
|
|
|
|
module Int32 = Core.Std.Int32
|
|
|
|
|
|
|
|
module Int63 = Core.Std.Int63
|
|
|
|
|
|
|
|
module Int64 = Core.Std.Int64
|
|
|
|
|
|
|
|
module Lazy = Core.Std.Lazy
|
|
|
|
|
|
|
|
module Nativeint = Core.Std.Nativeint
|
|
|
|
|
|
|
|
module Option = Core.Std.Option
|
|
|
|
|
|
|
|
module Pid = Core.Std.Pid
|
|
|
|
|
|
|
|
module Printexc = Core.Std.Printexc
|
|
|
|
|
|
|
|
module Printf = Core.Std.Printf
|
|
|
|
|
|
|
|
module Queue = Core.Std.Queue
|
|
|
|
|
|
|
|
module Random = Core.Std.Random
|
|
|
|
|
|
|
|
module Signal = Core.Std.Signal
|
|
|
|
|
|
|
|
module Stack = Core.Std.Stack
|
|
|
|
|
|
|
|
module String = Core.Std.String
|
|
|
|
|
|
|
|
module Sys = struct
|
|
|
|
module Sys = struct
|
|
|
|
include Core.Std.Sys
|
|
|
|
include Core.Std.Sys
|
|
|
|
|
|
|
|
|
|
|
@ -50,28 +24,20 @@ module Sys = struct
|
|
|
|
try is_file ?follow_symlinks path
|
|
|
|
try is_file ?follow_symlinks path
|
|
|
|
with Unix.Unix_error _ -> `Unknown
|
|
|
|
with Unix.Unix_error _ -> `Unknown
|
|
|
|
end
|
|
|
|
end
|
|
|
|
module Unix = Core.Std.Unix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module IntSet = Caml.Set.Make(Int)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include (Core.Std : module type of Core.Std with module Sys := Sys)
|
|
|
|
|
|
|
|
|
|
|
|
(** List police: don't use the list module to avoid non-tail recursive
|
|
|
|
let ( @ ) = Caml.List.append
|
|
|
|
functions and builtin equality. Use IList instead. *)
|
|
|
|
|
|
|
|
module List = struct end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(** Compare police: generic compare disabled. *)
|
|
|
|
|
|
|
|
let compare = ()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(* Use Caml.Set since they are serialized using Marshal, and Core.Std.Set includes the comparison
|
|
|
|
|
|
|
|
function in its representation, which Marshal cannot (de)serialize. *)
|
|
|
|
|
|
|
|
module IntSet = Caml.Set.Make(Int)
|
|
|
|
|
|
|
|
|
|
|
|
(** {2 Generic Utility Functions} *)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type ('a, 'b) result =
|
|
|
|
(** Compare police: generic compare mostly disabled. *)
|
|
|
|
| Ok of 'a
|
|
|
|
let compare = No_polymorphic_compare.compare
|
|
|
|
| Error of 'b
|
|
|
|
let equal = No_polymorphic_compare.equal
|
|
|
|
|
|
|
|
|
|
|
|
let fst3 (x,_,_) = x
|
|
|
|
|
|
|
|
let snd3 (_,x,_) = x
|
|
|
|
|
|
|
|
let trd3 (_,_,x) = x
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let failwithf fmt =
|
|
|
|
let failwithf fmt =
|
|
|
|
Format.kfprintf (fun _ -> failwith (Format.flush_str_formatter ()))
|
|
|
|
Format.kfprintf (fun _ -> failwith (Format.flush_str_formatter ()))
|
|
|
|