aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel/classes.mli
blob: 5953c14f94271b0d3b1de2059c4e208e7721b524 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
(************************************************************************)
(*  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$ 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*)

(* Errors *)

val mismatched_params : env -> constr_expr list -> rel_context -> 'a

val mismatched_props : env -> constr_expr list -> rel_context -> 'a

(* Post-hoc class declaration. *)

val declare_class : bool -> identifier located -> unit

(* Instance declaration *)

val declare_instance : bool -> identifier located -> unit

val declare_instance_constant :
  typeclass ->
  int option -> (* priority *)
  bool -> (* globality *)
  Impargs.manual_explicitation list -> (* implicits *)
  ?hook:(Libnames.global_reference -> 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 ->
  constr_expr ->
  ?generalize:bool ->
  ?tac:Proof_type.tactic  ->
  ?hook:(Libnames.global_reference -> unit) ->
  int option ->
  identifier

(* Setting opacity *)

val set_typeclass_transparency : evaluable_global_reference -> bool -> unit

(* For generation on names based on classes only *)

val id_of_class : typeclass -> identifier

(* Context command *)

val context : ?hook:(Libnames.global_reference -> unit) ->
  local_binder list -> unit

(* Forward ref for refine *)

val refine_ref : (open_constr -> Proof_type.tactic) ref