summaryrefslogtreecommitdiff
path: root/toplevel/record.mli
blob: 48181437f2c59b2da9c9121358e5131930564c0c (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
(************************************************************************)
(*  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: record.mli 11282 2008-07-28 11:51:53Z msozeau $ i*)

(*i*)
open Names
open Term
open Sign
open Vernacexpr
open Topconstr
open Impargs
(*i*)

(* [declare_projections ref name coers params fields] declare projections of
   record [ref] (if allowed) using the given [name] as argument, and put them
   as coercions accordingly to [coers]; it returns the absolute names of projections *)

val declare_projections :
  inductive -> ?kind:Decl_kinds.definition_object_kind -> ?name:identifier ->
  bool list -> manual_explicitation list list -> rel_context -> 
  bool list * constant option list

val declare_structure : identifier -> identifier -> 
  manual_explicitation list -> rel_context -> (* params *)
  Term.constr -> (* arity *)
  Impargs.manual_explicitation list list -> Sign.rel_context -> (* fields *)
  ?kind:Decl_kinds.definition_object_kind -> ?name:identifier ->
  bool -> (* coercion? *)
  bool list -> (* field coercions *)
  mutual_inductive

val definition_structure :
  lident with_coercion * local_binder list *
  (local_decl_expr with_coercion) list * identifier * sorts -> kernel_name