summaryrefslogtreecommitdiff
path: root/toplevel/classes.mli
diff options
context:
space:
mode:
Diffstat (limited to 'toplevel/classes.mli')
-rw-r--r--toplevel/classes.mli103
1 files changed, 103 insertions, 0 deletions
diff --git a/toplevel/classes.mli b/toplevel/classes.mli
new file mode 100644
index 00000000..f3cb0c58
--- /dev/null
+++ b/toplevel/classes.mli
@@ -0,0 +1,103 @@
+(************************************************************************)
+(* v * The Coq Proof Assistant / The Coq Development Team *)
+(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
+(* \VV/ **************************************************************)
+(* // * This file is distributed under the terms of the *)
+(* * GNU Lesser General Public License Version 2.1 *)
+(************************************************************************)
+
+(*i $Id: classes.mli 11024 2008-05-30 12:41:39Z msozeau $ i*)
+
+(*i*)
+open Names
+open Decl_kinds
+open Term
+open Sign
+open Evd
+open Environ
+open Nametab
+open Mod_subst
+open Topconstr
+open Util
+open Typeclasses
+open Implicit_quantifiers
+(*i*)
+
+type binder_list = (identifier located * bool * constr_expr) list
+type binder_def_list = (identifier located * identifier located list * constr_expr) list
+
+val binders_of_lidents : identifier located list -> local_binder list
+
+val declare_implicit_proj : typeclass -> (identifier * constant) ->
+ Impargs.manual_explicitation list -> bool -> unit
+(*
+val infer_super_instances : env -> constr list ->
+ named_context -> named_context -> types list * identifier list * named_context
+*)
+val new_class : identifier located ->
+ local_binder list ->
+ Vernacexpr.sort_expr located option ->
+ local_binder list ->
+ binder_list -> unit
+
+(* By default, print the free variables that are implicitely generalized. *)
+
+val default_on_free_vars : identifier list -> unit
+
+val fail_on_free_vars : identifier list -> unit
+
+val declare_instance_constant :
+ typeclass ->
+ int option -> (* priority *)
+ bool -> (* globality *)
+ Impargs.manual_explicitation list -> (* implicits *)
+ ?hook:(Names.constant -> unit) ->
+ identifier -> (* name *)
+ Term.constr -> (* body *)
+ Term.types -> (* type *)
+ Names.identifier
+
+val new_instance :
+ ?global:bool -> (* Not global by default. *)
+ local_binder list ->
+ typeclass_constraint ->
+ binder_def_list ->
+ ?on_free_vars:(identifier list -> unit) ->
+ ?tac:Proof_type.tactic ->
+ ?hook:(constant -> unit) ->
+ int option ->
+ identifier
+
+(* For generation on names based on classes only *)
+val id_of_class : typeclass -> identifier
+
+val context : ?hook:(Libnames.global_reference -> unit) -> typeclass_context -> unit
+
+val declare_instance : bool -> identifier located -> unit
+
+val mismatched_params : env -> constr_expr list -> named_context -> 'a
+
+val mismatched_props : env -> constr_expr list -> named_context -> 'a
+
+val solve_by_tac : env ->
+ Evd.evar_defs ->
+ Evd.evar ->
+ evar_info ->
+ Proof_type.tactic ->
+ Evd.evar_defs * bool
+
+val solve_evars_by_tac : env ->
+ Evd.evar_defs ->
+ Proof_type.tactic ->
+ Evd.evar_defs
+
+val refine_ref : (open_constr -> Proof_type.tactic) ref
+
+val decompose_named_assum : types -> named_context * types
+
+val push_named_context : named_context -> env -> env
+
+val name_typeclass_binders : Idset.t ->
+ Topconstr.local_binder list ->
+ Topconstr.local_binder list * Idset.t
+