aboutsummaryrefslogtreecommitdiffhomepage
path: root/vernac/record.mli
diff options
context:
space:
mode:
authorGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2016-12-18 18:14:58 +0100
committerGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-02-15 20:45:28 +0100
commitfa9df2efe5666789bf91bb7761567cd53e6c451f (patch)
treedfabeded9b4060114e0f9d7f4d3760efc982ae0c /vernac/record.mli
parent0df095ec0715f548180bbff70a6feb673c6726a6 (diff)
[stm] Break stm/toplevel dependency loop.
Currently, the STM, vernac interpretation, and the toplevel are intertwined in a mutual dependency that needs to be resolved using imperative callbacks. This is problematic for a few reasons, in particular it makes the interpretation of commands that affect the document quite intricate. As a first step, we split the `toplevel/` directory into two: "pure" vernac interpretation is moved to the `vernac/` directory, on which the STM relies. Test suite passes, and only one command seems to be disabled with this approach, "Show Script" which is to my understanding obsolete. Subsequent commits will fix this and refine some of the invariants that are not needed anymore.
Diffstat (limited to 'vernac/record.mli')
-rw-r--r--vernac/record.mli46
1 files changed, 46 insertions, 0 deletions
diff --git a/vernac/record.mli b/vernac/record.mli
new file mode 100644
index 000000000..c50e57786
--- /dev/null
+++ b/vernac/record.mli
@@ -0,0 +1,46 @@
+(************************************************************************)
+(* v * The Coq Proof Assistant / The Coq Development Team *)
+(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2016 *)
+(* \VV/ **************************************************************)
+(* // * This file is distributed under the terms of the *)
+(* * GNU Lesser General Public License Version 2.1 *)
+(************************************************************************)
+
+open Names
+open Term
+open Vernacexpr
+open Constrexpr
+open Impargs
+open Globnames
+
+val primitive_flag : bool ref
+
+(** [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 -> Id.t ->
+ coercion_flag list -> manual_explicitation list list -> Context.Rel.t ->
+ (Name.t * bool) list * constant option list
+
+val declare_structure :
+ Decl_kinds.recursivity_kind ->
+ bool (** polymorphic?*) -> Univ.universe_context ->
+ Id.t -> Id.t ->
+ manual_explicitation list -> Context.Rel.t -> (** params *) constr -> (** arity *)
+ bool (** template arity ? *) ->
+ Impargs.manual_explicitation list list -> Context.Rel.t -> (** fields *)
+ ?kind:Decl_kinds.definition_object_kind -> ?name:Id.t ->
+ bool -> (** coercion? *)
+ bool list -> (** field coercions *)
+ Evd.evar_map ->
+ inductive
+
+val definition_structure :
+ inductive_kind * Decl_kinds.polymorphic * Decl_kinds.recursivity_kind *
+ plident with_coercion * local_binder list *
+ (local_decl_expr with_instance with_priority with_notation) list *
+ Id.t * constr_expr option -> global_reference
+
+val declare_existing_class : global_reference -> unit