diff --git a/infer/src/base/IStd.ml b/infer/src/base/IStd.ml index 2b2b56732..ed803197d 100644 --- a/infer/src/base/IStd.ml +++ b/infer/src/base/IStd.ml @@ -7,27 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. *) -module Sys = struct - include Core.Std.Sys - - (* Core_sys does not catch Unix_error ENAMETOOLONG, see - https://github.com/janestreet/core/issues/76 *) - let file_exists ?follow_symlinks path = - try file_exists ?follow_symlinks path - with Unix.Unix_error _ -> `Unknown - - let is_directory ?follow_symlinks path = - try is_directory ?follow_symlinks path - with Unix.Unix_error _ -> `Unknown - - let is_file ?follow_symlinks path = - try is_file ?follow_symlinks path - with Unix.Unix_error _ -> `Unknown -end - -include - (Core.Std : module type of Core.Std - with module Sys := Sys) +include Core.Std let ( @ ) = Caml.List.append diff --git a/infer/src/base/IStd.mli b/infer/src/base/IStd.mli deleted file mode 100644 index 97c63da00..000000000 --- a/infer/src/base/IStd.mli +++ /dev/null @@ -1,58 +0,0 @@ -(* - * Copyright (c) 2016 - present Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - *) - -open Core.Std - -(* Core's Gc and Signal modules wrap handler functions in catch-all exception handlers that - exit. This defeats the timeout mechanisms. So deprecate the offending functions to cause a - compilation failure if they are used. *) - -module Gc : sig - module Expert : sig - module Alarm : sig - include module type of Gc.Expert.Alarm - val create : (unit -> unit) -> t - [@@deprecated "Adds a catch-all exception handler that exits, use [Caml.Gc.create_alarm]"] - end - include module type of Gc.Expert with module Alarm := Alarm - val add_finalizer : 'a Heap_block.t -> ('a Heap_block.t -> unit) -> unit - [@@deprecated "Adds a catch-all exception handler that exits, use [Caml.Gc.finalise]"] - val add_finalizer_exn : 'a -> ('a -> unit) -> unit - [@@deprecated "Adds a catch-all exception handler that exits, use [Caml.Gc.finalise]"] - end - include (module type of Gc with module Expert := Expert) -end - -module Signal : sig - module Expert : sig - include module type of Signal.Expert - val signal : Signal.t -> behavior -> behavior - [@@deprecated "Adds a catch-all exception handler that exits, use [Caml.Sys.signal]"] - val set : Signal.t -> behavior -> unit - [@@deprecated "Adds a catch-all exception handler that exits, use [Caml.Sys.set_signal]"] - val handle : Signal.t -> (Signal.t -> unit) -> unit - [@@deprecated "Adds a catch-all exception handler that exits, use [Caml.Sys.set_signal]"] - end - include (module type of Signal with module Expert := Expert) -end - -include - (module type of Core.Std - with module Gc := Gc - and module Signal := Signal) - -module IntSet : Caml.Set.S with type elt = Int.t - -(* Compare police: generic compare mostly disabled. *) -val compare : No_polymorphic_compare.compare -val equal : No_polymorphic_compare.compare - -val failwithf : ('a, Format.formatter, unit, 'b) format4 -> 'a - -val invalid_argf : ('a, Format.formatter, unit, 'b) format4 -> 'a