Skip to content

Commit

Permalink
Remove many superfluous 'open' indicated by ocamlc -w +33
Browse files Browse the repository at this point in the history
 With ocaml 4.01, the 'unused open' warning also checks the mli :-)

 Beware: some open are reported as useless when compiling with camlp5,
 but are necessary for compatibility with camlp4. These open are now
 marked with a comment.
  • Loading branch information
letouzey committed Mar 5, 2014
1 parent 3080dd5 commit adfd437
Show file tree
Hide file tree
Showing 222 changed files with 14 additions and 504 deletions.
1 change: 0 additions & 1 deletion checker/closure.mli
Expand Up @@ -7,7 +7,6 @@
(************************************************************************) (************************************************************************)


(*i*) (*i*)
open Pp
open Names open Names
open Cic open Cic
open Esubst open Esubst
Expand Down
1 change: 0 additions & 1 deletion checker/environ.mli
@@ -1,6 +1,5 @@
open Names open Names
open Cic open Cic
open Term


(* Environments *) (* Environments *)


Expand Down
2 changes: 0 additions & 2 deletions checker/indtypes.mli
Expand Up @@ -8,9 +8,7 @@


(*i*) (*i*)
open Names open Names
open Univ
open Cic open Cic
open Typeops
open Environ open Environ
(*i*) (*i*)


Expand Down
1 change: 0 additions & 1 deletion checker/mod_checking.ml
@@ -1,6 +1,5 @@


open Pp open Pp
open Errors
open Util open Util
open Names open Names
open Cic open Cic
Expand Down
1 change: 0 additions & 1 deletion checker/modops.ml
Expand Up @@ -12,7 +12,6 @@ open Util
open Pp open Pp
open Names open Names
open Cic open Cic
open Term
open Declarations open Declarations
(*i*) (*i*)


Expand Down
1 change: 0 additions & 1 deletion checker/modops.mli
Expand Up @@ -8,7 +8,6 @@


(*i*) (*i*)
open Names open Names
open Univ
open Cic open Cic
open Environ open Environ
(*i*) (*i*)
Expand Down
1 change: 0 additions & 1 deletion checker/safe_typing.ml
Expand Up @@ -11,7 +11,6 @@ open Errors
open Util open Util
open Cic open Cic
open Names open Names
open Declarations
open Environ open Environ


(************************************************************************) (************************************************************************)
Expand Down
1 change: 0 additions & 1 deletion checker/safe_typing.mli
Expand Up @@ -7,7 +7,6 @@
(************************************************************************) (************************************************************************)


(*i*) (*i*)
open Names
open Cic open Cic
open Environ open Environ
(*i*) (*i*)
Expand Down
1 change: 0 additions & 1 deletion checker/type_errors.ml
Expand Up @@ -8,7 +8,6 @@


open Names open Names
open Cic open Cic
open Term
open Environ open Environ


type unsafe_judgment = constr * constr type unsafe_judgment = constr * constr
Expand Down
1 change: 0 additions & 1 deletion checker/typeops.ml
Expand Up @@ -14,7 +14,6 @@ open Cic
open Term open Term
open Reduction open Reduction
open Type_errors open Type_errors
open Declarations
open Inductive open Inductive
open Environ open Environ


Expand Down
2 changes: 0 additions & 2 deletions checker/typeops.mli
Expand Up @@ -7,9 +7,7 @@
(************************************************************************) (************************************************************************)


(*i*) (*i*)
open Names
open Cic open Cic
open Term
open Environ open Environ
(*i*) (*i*)


Expand Down
2 changes: 1 addition & 1 deletion grammar/argextend.ml4
Expand Up @@ -232,7 +232,7 @@ let declare_vernac_argument loc s pr cl =


open Pcoq open Pcoq
open Pcaml open Pcaml
open PcamlSig open PcamlSig (* necessary for camlp4 *)


EXTEND EXTEND
GLOBAL: str_item; GLOBAL: str_item;
Expand Down
2 changes: 1 addition & 1 deletion grammar/q_constr.ml4
Expand Up @@ -11,7 +11,7 @@
open Q_util open Q_util
open Compat open Compat
open Pcaml open Pcaml
open PcamlSig open PcamlSig (* necessary for camlp4 *)


let loc = CompatLoc.ghost let loc = CompatLoc.ghost
let dloc = <:expr< Loc.ghost >> let dloc = <:expr< Loc.ghost >>
Expand Down
2 changes: 1 addition & 1 deletion grammar/q_util.mli
Expand Up @@ -6,7 +6,7 @@
(* * GNU Lesser General Public License Version 2.1 *) (* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************) (************************************************************************)


open Compat open Compat (* necessary for camlp4 *)


val mlexpr_of_list : ('a -> MLast.expr) -> 'a list -> MLast.expr val mlexpr_of_list : ('a -> MLast.expr) -> 'a list -> MLast.expr


Expand Down
2 changes: 1 addition & 1 deletion grammar/tacextend.ml4
Expand Up @@ -186,7 +186,7 @@ let declare_tactic loc s c cl =
] ]


open Pcaml open Pcaml
open PcamlSig open PcamlSig (* necessary for camlp4 *)


EXTEND EXTEND
GLOBAL: str_item; GLOBAL: str_item;
Expand Down
2 changes: 1 addition & 1 deletion grammar/vernacextend.ml4
Expand Up @@ -113,7 +113,7 @@ let declare_command loc s c nt cl =
} >> ] } >> ]


open Pcaml open Pcaml
open PcamlSig open PcamlSig (* necessary for camlp4 *)


EXTEND EXTEND
GLOBAL: str_item; GLOBAL: str_item;
Expand Down
2 changes: 0 additions & 2 deletions ide/gtk_parsing.ml
Expand Up @@ -6,8 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *) (* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************) (************************************************************************)


open Ideutils

let underscore = Glib.Utf8.to_unichar "_" ~pos:(ref 0) let underscore = Glib.Utf8.to_unichar "_" ~pos:(ref 0)
let arobase = Glib.Utf8.to_unichar "@" ~pos:(ref 0) let arobase = Glib.Utf8.to_unichar "@" ~pos:(ref 0)
let prime = Glib.Utf8.to_unichar "'" ~pos:(ref 0) let prime = Glib.Utf8.to_unichar "'" ~pos:(ref 0)
Expand Down
1 change: 0 additions & 1 deletion ide/preferences.ml
Expand Up @@ -7,7 +7,6 @@
(************************************************************************) (************************************************************************)


open Configwin open Configwin
open Printf


let pref_file = Filename.concat (Minilib.coqide_config_home ()) "coqiderc" let pref_file = Filename.concat (Minilib.coqide_config_home ()) "coqiderc"
let accel_file = Filename.concat (Minilib.coqide_config_home ()) "coqide.keys" let accel_file = Filename.concat (Minilib.coqide_config_home ()) "coqide.keys"
Expand Down
1 change: 0 additions & 1 deletion ide/utils/editable_cells.ml
@@ -1,4 +1,3 @@
open GTree
open Gobject open Gobject


let create l = let create l =
Expand Down
4 changes: 0 additions & 4 deletions ide/wg_ScriptView.ml
Expand Up @@ -6,10 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *) (* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************) (************************************************************************)


open Ideutils
open GText
open Gtk_parsing

type insert_action = { type insert_action = {
ins_val : string; ins_val : string;
ins_off : int; ins_off : int;
Expand Down
9 changes: 0 additions & 9 deletions interp/constrarg.ml
Expand Up @@ -7,16 +7,7 @@
(************************************************************************) (************************************************************************)


open Loc open Loc
open Pp
open Names
open Term
open Libnames
open Globnames
open Glob_term
open Genredexpr
open Tacexpr open Tacexpr
open Pattern
open Constrexpr
open Term open Term
open Misctypes open Misctypes
open Genarg open Genarg
Expand Down
1 change: 0 additions & 1 deletion interp/constrarg.mli
Expand Up @@ -14,7 +14,6 @@ open Names
open Term open Term
open Libnames open Libnames
open Globnames open Globnames
open Glob_term
open Genredexpr open Genredexpr
open Pattern open Pattern
open Constrexpr open Constrexpr
Expand Down
3 changes: 0 additions & 3 deletions interp/constrexpr_ops.mli
Expand Up @@ -7,12 +7,9 @@
(************************************************************************) (************************************************************************)


open Loc open Loc
open Pp
open Names open Names
open Libnames open Libnames
open Misctypes open Misctypes
open Term
open Mod_subst
open Constrexpr open Constrexpr


(** Constrexpr_ops: utilities on [constr_expr] *) (** Constrexpr_ops: utilities on [constr_expr] *)
Expand Down
1 change: 0 additions & 1 deletion interp/constrextern.ml
Expand Up @@ -26,7 +26,6 @@ open Glob_ops
open Pattern open Pattern
open Nametab open Nametab
open Notation open Notation
open Reserve
open Detyping open Detyping
open Misctypes open Misctypes
open Decl_kinds open Decl_kinds
Expand Down
2 changes: 0 additions & 2 deletions interp/constrextern.mli
Expand Up @@ -6,15 +6,13 @@
(* * GNU Lesser General Public License Version 2.1 *) (* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************) (************************************************************************)


open Pp
open Names open Names
open Term open Term
open Context open Context
open Termops open Termops
open Environ open Environ
open Libnames open Libnames
open Globnames open Globnames
open Nametab
open Glob_term open Glob_term
open Pattern open Pattern
open Constrexpr open Constrexpr
Expand Down
1 change: 0 additions & 1 deletion interp/constrintern.ml
Expand Up @@ -9,7 +9,6 @@
open Pp open Pp
open Errors open Errors
open Util open Util
open Flags
open Names open Names
open Nameops open Nameops
open Namegen open Namegen
Expand Down
1 change: 0 additions & 1 deletion interp/constrintern.mli
Expand Up @@ -17,7 +17,6 @@ open Glob_term
open Pattern open Pattern
open Constrexpr open Constrexpr
open Notation_term open Notation_term
open Termops
open Pretyping open Pretyping
open Misctypes open Misctypes
open Decl_kinds open Decl_kinds
Expand Down
2 changes: 0 additions & 2 deletions interp/coqlib.mli
Expand Up @@ -9,9 +9,7 @@
open Names open Names
open Libnames open Libnames
open Globnames open Globnames
open Nametab
open Term open Term
open Pattern
open Util open Util


(** This module collects the global references, constructions and (** This module collects the global references, constructions and
Expand Down
2 changes: 0 additions & 2 deletions interp/genintern.ml
Expand Up @@ -6,8 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *) (* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************) (************************************************************************)


open Pp
open Util
open Names open Names
open Mod_subst open Mod_subst
open Genarg open Genarg
Expand Down
1 change: 0 additions & 1 deletion interp/implicit_quantifiers.ml
Expand Up @@ -14,7 +14,6 @@ open Util
open Glob_term open Glob_term
open Constrexpr open Constrexpr
open Libnames open Libnames
open Globnames
open Typeclasses open Typeclasses
open Typeclasses_errors open Typeclasses_errors
open Pp open Pp
Expand Down
9 changes: 0 additions & 9 deletions interp/implicit_quantifiers.mli
Expand Up @@ -8,19 +8,10 @@


open Loc open Loc
open Names open Names
open Decl_kinds
open Term
open Context
open Evd
open Environ
open Nametab
open Mod_subst
open Glob_term open Glob_term
open Constrexpr open Constrexpr
open Pp
open Libnames open Libnames
open Globnames open Globnames
open Typeclasses


val declare_generalizable : Vernacexpr.locality_flag -> (Id.t located) list option -> unit val declare_generalizable : Vernacexpr.locality_flag -> (Id.t located) list option -> unit


Expand Down
1 change: 0 additions & 1 deletion interp/modintern.ml
Expand Up @@ -7,7 +7,6 @@
(************************************************************************) (************************************************************************)


open Declarations open Declarations
open Entries
open Libnames open Libnames
open Constrexpr open Constrexpr
open Constrintern open Constrintern
Expand Down
5 changes: 0 additions & 5 deletions interp/modintern.mli
Expand Up @@ -6,13 +6,8 @@
(* * GNU Lesser General Public License Version 2.1 *) (* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************) (************************************************************************)


open Loc
open Declarations
open Environ open Environ
open Entries open Entries
open Pp
open Libnames
open Names
open Constrexpr open Constrexpr
open Misctypes open Misctypes


Expand Down
1 change: 0 additions & 1 deletion interp/notation.mli
Expand Up @@ -9,7 +9,6 @@
open Pp open Pp
open Bigint open Bigint
open Names open Names
open Nametab
open Libnames open Libnames
open Globnames open Globnames
open Constrexpr open Constrexpr
Expand Down
1 change: 0 additions & 1 deletion interp/notation_ops.mli
Expand Up @@ -8,7 +8,6 @@


open Names open Names
open Notation_term open Notation_term
open Misctypes
open Glob_term open Glob_term


(** Utilities about [notation_constr] *) (** Utilities about [notation_constr] *)
Expand Down
1 change: 0 additions & 1 deletion interp/ppextend.mli
Expand Up @@ -7,7 +7,6 @@
(************************************************************************) (************************************************************************)


open Pp open Pp
open Names


(** {6 Pretty-print. } *) (** {6 Pretty-print. } *)


Expand Down
2 changes: 0 additions & 2 deletions interp/reserve.ml
Expand Up @@ -123,8 +123,6 @@ let revert_reserved_type t =


let _ = Namegen.set_reserved_typed_name revert_reserved_type let _ = Namegen.set_reserved_typed_name revert_reserved_type


open Glob_term

let default_env () = { let default_env () = {
ninterp_var_type = Id.Map.empty; ninterp_var_type = Id.Map.empty;
ninterp_rec_vars = Id.Map.empty; ninterp_rec_vars = Id.Map.empty;
Expand Down
2 changes: 0 additions & 2 deletions interp/reserve.mli
Expand Up @@ -7,9 +7,7 @@
(************************************************************************) (************************************************************************)


open Loc open Loc
open Pp
open Names open Names
open Glob_term
open Notation_term open Notation_term


val declare_reserved_type : Id.t located list -> notation_constr -> unit val declare_reserved_type : Id.t located list -> notation_constr -> unit
Expand Down
1 change: 0 additions & 1 deletion interp/smartlocate.mli
Expand Up @@ -7,7 +7,6 @@
(************************************************************************) (************************************************************************)


open Loc open Loc
open Pp
open Names open Names
open Libnames open Libnames
open Globnames open Globnames
Expand Down
1 change: 0 additions & 1 deletion interp/stdarg.ml
Expand Up @@ -6,7 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *) (* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************) (************************************************************************)


open Pp
open Genarg open Genarg


let wit_unit : unit uniform_genarg_type = let wit_unit : unit uniform_genarg_type =
Expand Down
3 changes: 0 additions & 3 deletions interp/syntax_def.mli
Expand Up @@ -8,9 +8,6 @@


open Names open Names
open Notation_term open Notation_term
open Glob_term
open Nametab
open Libnames


(** Syntactic definitions. *) (** Syntactic definitions. *)


Expand Down
4 changes: 0 additions & 4 deletions interp/topconstr.mli
Expand Up @@ -8,11 +8,7 @@


open Loc open Loc
open Names open Names
open Libnames
open Misctypes
open Decl_kinds
open Constrexpr open Constrexpr
open Notation_term


(** Topconstr *) (** Topconstr *)


Expand Down

0 comments on commit adfd437

Please sign in to comment.