Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dune preliminaries: remove unused opens #1022

Merged
merged 1 commit into from
Feb 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/batBool.ml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*)


open BatNumber

module BaseBool = struct
module BaseBool : BatNumber.NUMERIC_BASE with type t = bool = struct
type t = bool
external not : bool -> bool = "%boolnot"
(** The boolean negation. *)
Expand All @@ -36,6 +33,7 @@ module BaseBool = struct
(** The boolean ``or''. Evaluation is sequential, left-to-right:
in [e1 || e2], [e1] is evaluated first, and if it returns [true],
[e2] is not evaluated at all. *)

let zero, one = false, true
let neg = not

Expand Down
1 change: 0 additions & 1 deletion src/batBuffer.mlv
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*)


open BatString
include Buffer

(** The underlying buffer type. *)
Expand Down
1 change: 0 additions & 1 deletion src/batFloat.ml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*)


open BatNumber

module BaseFloat = struct
Expand Down
1 change: 0 additions & 1 deletion src/batGc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*)


open BatPrintf
include Gc

Expand Down
4 changes: 4 additions & 0 deletions src/batGenlex.ml
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ struct
module Make (M:Definition) =
struct
open M

(** {6 Case management} *)

let char =
if case_sensitive then char
else case_char
Expand All @@ -325,6 +327,7 @@ struct
else BatString.icompare

(** {6 Whitespace management} *)

let line_comment =
match line_comment_start with
| None -> fail
Expand Down Expand Up @@ -386,6 +389,7 @@ struct
return r

(** {6 Actual content} *)

let identifier_content = either [ident_start >:: zero_plus ident_letter ;
op_start >:: zero_plus op_letter]

Expand Down
2 changes: 0 additions & 2 deletions src/batHashtbl.mli
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
@author David Teller
*)

open Hashtbl

type ('a, 'b) t = ('a, 'b) Hashtbl.t
(** A Hashtable with keys of type 'a and values 'b *)

Expand Down
2 changes: 1 addition & 1 deletion src/batHashtbl.mlv
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ let enum h =
let hdata = ref idata in
let hcount = ref icount in
let force() =
(** this is a hack in order to keep an O(1) enum constructor **)
(* this is a hack in order to keep an O(1) enum constructor **)
if !hcount = -1 then (
hcount := (h_conv h).size;
hdata := Array.copy (h_conv h).data;
Expand Down
2 changes: 0 additions & 2 deletions src/batIO.mli
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@
@documents BatInnerIO
*)

open BatInnerIO

type input = BatInnerIO.input
(** The abstract input type. *)

Expand Down
6 changes: 3 additions & 3 deletions src/batLazyList.ml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ let get l = match next l with
let peek l = match next l with
| Nil -> None
| Cons (x, _) -> Some x
(**
{6 Constructors}
*)

(** {6 Constructors} *)

let from_while f =
let rec aux () = lazy (
match f () with
Expand Down
2 changes: 0 additions & 2 deletions src/batList.mlv
Original file line number Diff line number Diff line change
Expand Up @@ -1579,8 +1579,6 @@ end


module Labels = struct

type 'a t = 'a list
let init i ~f = init i f
let make n x = make n x
let iteri ~f l = iteri f l
Expand Down
3 changes: 2 additions & 1 deletion src/batMap.ml
Original file line number Diff line number Diff line change
Expand Up @@ -991,8 +991,9 @@ sig
val to_seq_from : key -> 'a t -> (key * 'a) BatSeq.t
val add_seq : (key * 'a) BatSeq.t -> 'a t -> 'a t
val of_seq : (key * 'a) BatSeq.t -> 'a t
(** {6 Boilerplate code}*)

(** {7 Printing}*)

val print : ?first:string -> ?last:string -> ?sep:string -> ?kvsep:string ->
('a BatInnerIO.output -> key -> unit) ->
('a BatInnerIO.output -> 'c -> unit) ->
Expand Down
1 change: 1 addition & 0 deletions src/batOrd.mli
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ val bin_ord : 'a ord -> 'a -> 'a -> 'b ord -> 'b -> 'b -> order
[bin_ord ord1 v1 v1' ord2 v2 v2'] is [ord2 v2 v2'] if [ord1 v1 v1' = Eq],
and [ord1 v1 v1'] otherwise.
*)

val bin_eq : 'a eq -> 'a -> 'a -> 'b eq -> 'b -> 'b -> bool

val map_eq : ('a -> 'b) -> 'b eq -> 'a eq
Expand Down
5 changes: 1 addition & 4 deletions src/batParserCo.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
open BatList
open BatString
open List
open BatLazyList
open BatIO
Expand Down Expand Up @@ -32,12 +31,10 @@ struct
let of_enum l =
of_lazy_list (of_enum l)

open Lexing

(**TODO: Handle EOF !*)
let of_lexer _l = assert false
(** LazyList.of_enum (BatEnum.from (fun () ->

let open Lexing in
l.refill_buff l;
(l.lex_buffer, (l.lex_start_p, l.lex_curr_p))))*)

Expand Down
1 change: 1 addition & 0 deletions src/batPathGen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ module type PathType = sig

{e Windows:} If single dot is next to root, it is preserved.
*)

val normalize_in_graph : t -> t
(** Another name for {!normalize_filepath}. *)

Expand Down
4 changes: 2 additions & 2 deletions src/batPrintf.mlv
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ let kbprintf2 k buf fmt =
mkprintf (fun _out -> k buf) out fmt
let sprintf2 fmt = ksprintf2 (identity) fmt
let bprintf2 buf fmt = kbprintf2 ignore buf fmt
(**
(*
Other possible implementation of [sprintf2],
left as example:

Expand All @@ -500,7 +500,7 @@ let bprintf2 buf fmt = kbprintf2 ignore buf fmt
mkprintf (fun out -> close_out out) out fmt
]
*)
(**
(*
Other possible implementation of [bprintf2],
left as example:
[
Expand Down
2 changes: 0 additions & 2 deletions src/batString.mliv
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
@author Edgar Friendly
*)

open String

val init : int -> (int -> char) -> string
(** [init l f] returns the string of length [l] with the chars
f 0 , f 1 , f 2 ... f (l-1).
Expand Down
4 changes: 0 additions & 4 deletions src/batUnix.mliv
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*)

open BatConcurrent

(** Low-level interface to the operating system (both Unix and Windows).

This module only provides low-level functions and types. Unless you
Expand Down Expand Up @@ -347,8 +345,6 @@ val single_write_substring : file_descr -> string -> int -> int -> int

(** {6 Interfacing with the standard input/output library} *)

open BatInnerIO

val in_channel_of_descr : file_descr -> in_channel
(** Create an input channel reading from the given descriptor.
The channel is initially in binary mode; use
Expand Down
1 change: 0 additions & 1 deletion testsuite/test_mapfunctors.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
open OUnit
open BatRandom
open BatPervasives

module MkTest (MkMap : functor (Ord : BatInterfaces.OrderedType)
-> BatMap.S with type key = Ord.t) =
Expand Down
1 change: 0 additions & 1 deletion testsuite/test_random.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
open OUnit
open BatPervasives

let assert_equal_arrays =
assert_equal ~printer:(BatIO.to_string (BatArray.print BatInt.print))
Expand Down
4 changes: 2 additions & 2 deletions toplevel/batteriesHelp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ let man_all sources ~tabs subject =
else
match
List.fold_left
(fun (((result_as_strings : string list)(**The text to display, as a list of strings, one string per kind.*),
_one_suggestion (**The latest suggestion -- used only in case there's only one suggestion.*)) as acc)
(fun (((result_as_strings : string list)(*The text to display, as a list of strings, one string per kind.*),
_one_suggestion (*The latest suggestion -- used only in case there's only one suggestion.*)) as acc)
(cmd, kind, singular, plural, _undefined) ->
match man_aux ~kind ~singular ~plural subject with
| `No_result -> acc
Expand Down