aboutsummaryrefslogtreecommitdiff
path: root/toplevel
diff options
context:
space:
mode:
authorArnaud Spiwack2014-09-03 18:16:21 +0200
committerArnaud Spiwack2014-09-04 10:25:55 +0200
commita93104d5462894d5d0651aa2e04e12c311eb5897 (patch)
tree8619451aa37d699fc012f0e5f6509560d9c46726 /toplevel
parent06e6a7b5a0d15f493a3f94fad905af2c44be9c09 (diff)
Remove [Infer] option of records.
Dead code formerly used by the now defunct [autoinstances].
Diffstat (limited to 'toplevel')
-rw-r--r--toplevel/record.ml12
-rw-r--r--toplevel/record.mli4
-rw-r--r--toplevel/vernacentries.ml12
3 files changed, 14 insertions, 14 deletions
diff --git a/toplevel/record.ml b/toplevel/record.ml
index 56e8c1492d..f3565a721d 100644
--- a/toplevel/record.ml
+++ b/toplevel/record.ml
@@ -319,7 +319,7 @@ let structure_signature ctx =
open Typeclasses
-let declare_structure finite infer poly ctx id idbuild paramimpls params arity fieldimpls fields
+let declare_structure finite poly ctx id idbuild paramimpls params arity fieldimpls fields
?(kind=StructureComponent) ?name is_coe coers sign =
let nparams = List.length params and nfields = List.length fields in
let args = Termops.extended_rel_list nfields params in
@@ -357,7 +357,7 @@ let implicits_of_context ctx =
in ExplByPos (i, explname), (true, true, true))
1 (List.rev (Anonymous :: (List.map pi1 ctx)))
-let declare_class finite def infer poly ctx id idbuild paramimpls params arity fieldimpls fields
+let declare_class finite def poly ctx id idbuild paramimpls params arity fieldimpls fields
?(kind=StructureComponent) ?name is_coe coers priorities sign =
let fieldimpls =
(* Make the class implicit in the projections, and the params if applicable. *)
@@ -399,7 +399,7 @@ let declare_class finite def infer poly ctx id idbuild paramimpls params arity f
cref, [Name proj_name, sub, Some proj_cst]
| _ ->
let idarg = Namegen.next_ident_away (snd id) (Termops.ids_of_context (Global.env())) in
- let ind = declare_structure BiFinite infer poly ctx (snd id) idbuild paramimpls
+ let ind = declare_structure BiFinite poly ctx (snd id) idbuild paramimpls
params arity fieldimpls fields
~kind:Method ~name:idarg false (List.map (fun _ -> false) fields) sign
in
@@ -434,7 +434,7 @@ open Vernacexpr
(* [fs] corresponds to fields and [ps] to parameters; [coers] is a
list telling if the corresponding fields must me declared as coercions
or subinstances *)
-let definition_structure (kind,poly,finite,infer,(is_coe,(loc,idstruc)),ps,cfs,idbuild,s) =
+let definition_structure (kind,poly,finite,(is_coe,(loc,idstruc)),ps,cfs,idbuild,s) =
let cfs,notations = List.split cfs in
let cfs,priorities = List.split cfs in
let coers,fs = List.split cfs in
@@ -455,14 +455,14 @@ let definition_structure (kind,poly,finite,infer,(is_coe,(loc,idstruc)),ps,cfs,i
let sign = structure_signature (fields@params) in
match kind with
| Class def ->
- let gr = declare_class finite def infer poly ctx (loc,idstruc) idbuild
+ let gr = declare_class finite def poly ctx (loc,idstruc) idbuild
implpars params arity implfs fields is_coe coers priorities sign in
gr
| _ ->
let implfs = List.map
(fun impls -> implpars @ Impargs.lift_implicits
(succ (List.length params)) impls) implfs in
- let ind = declare_structure finite infer poly ctx idstruc
+ let ind = declare_structure finite poly ctx idstruc
idbuild implpars params arity implfs
fields is_coe (List.map (fun coe -> not (Option.is_empty coe)) coers) sign in
IndRef ind
diff --git a/toplevel/record.mli b/toplevel/record.mli
index dac8636cb2..873e1ff0cc 100644
--- a/toplevel/record.mli
+++ b/toplevel/record.mli
@@ -26,7 +26,7 @@ val declare_projections :
(Name.t * bool) list * constant option list
val declare_structure : Decl_kinds.recursivity_kind ->
- bool (**infer?*) -> bool (** polymorphic?*) -> Univ.universe_context ->
+ bool (** polymorphic?*) -> Univ.universe_context ->
Id.t -> Id.t ->
manual_explicitation list -> rel_context -> (** params *) constr -> (** arity *)
Impargs.manual_explicitation list list -> rel_context -> (** fields *)
@@ -37,6 +37,6 @@ val declare_structure : Decl_kinds.recursivity_kind ->
inductive
val definition_structure :
- inductive_kind * Decl_kinds.polymorphic * Decl_kinds.recursivity_kind * bool(**infer?*)* lident with_coercion * local_binder list *
+ inductive_kind * Decl_kinds.polymorphic * Decl_kinds.recursivity_kind * lident with_coercion * local_binder list *
(local_decl_expr with_instance with_priority with_notation) list *
Id.t * constr_expr option -> global_reference
diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml
index a5803a24d2..adfccb5023 100644
--- a/toplevel/vernacentries.ml
+++ b/toplevel/vernacentries.ml
@@ -512,7 +512,7 @@ let vernac_assumption locality poly (local, kind) l nl =
let status = do_assumptions kind nl l in
if not status then Pp.feedback Feedback.AddedAxiom
-let vernac_record k poly finite infer struc binders sort nameopt cfs =
+let vernac_record k poly finite struc binders sort nameopt cfs =
let const = match nameopt with
| None -> add_prefix "Build_" (snd (snd struc))
| Some (_,id as lid) ->
@@ -523,9 +523,9 @@ let vernac_record k poly finite infer struc binders sort nameopt cfs =
match x with
| Vernacexpr.AssumExpr ((loc, Name id), _) -> Dumpglob.dump_definition (loc,id) false "proj"
| _ -> ()) cfs);
- ignore(Record.definition_structure (k,poly,finite,infer,struc,binders,cfs,const,sort))
+ ignore(Record.definition_structure (k,poly,finite,struc,binders,cfs,const,sort))
-let vernac_inductive poly lo finite infer indl =
+let vernac_inductive poly lo finite indl =
if Dumpglob.dump () then
List.iter (fun (((coe,lid), _, _, _, cstrs), _) ->
match cstrs with
@@ -542,13 +542,13 @@ let vernac_inductive poly lo finite infer indl =
Errors.error "The Variant keyword cannot be used to define a record type. Use Record instead."
| [ ( id , bl , c , b, RecordDecl (oc,fs) ), [] ] ->
vernac_record (match b with Class true -> Class false | _ -> b)
- poly finite infer id bl c oc fs
+ poly finite id bl c oc fs
| [ ( id , bl , c , Class true, Constructors [l]), _ ] ->
let f =
let (coe, ((loc, id), ce)) = l in
let coe' = if coe then Some true else None in
(((coe', AssumExpr ((loc, Name id), ce)), None), [])
- in vernac_record (Class true) poly finite infer id bl c None [f]
+ in vernac_record (Class true) poly finite id bl c None [f]
| [ ( id , bl , c , Class true, _), _ ] ->
Errors.error "Definitional classes must have a single method"
| [ ( id , bl , c , Class false, Constructors _), _ ] ->
@@ -1774,7 +1774,7 @@ let interp ?proof locality poly c =
| VernacEndProof e -> vernac_end_proof ?proof e
| VernacExactProof c -> vernac_exact_proof c
| VernacAssumption (stre,nl,l) -> vernac_assumption locality poly stre l nl
- | VernacInductive (priv,finite,infer,l) -> vernac_inductive poly priv finite infer l
+ | VernacInductive (priv,finite,l) -> vernac_inductive poly priv finite l
| VernacFixpoint (local, l) -> vernac_fixpoint locality poly local l
| VernacCoFixpoint (local, l) -> vernac_cofixpoint locality poly local l
| VernacScheme l -> vernac_scheme l