aboutsummaryrefslogtreecommitdiff
path: root/vernac
diff options
context:
space:
mode:
authorMaxime Dénès2017-04-03 15:21:16 +0200
committerMaxime Dénès2017-04-03 15:22:40 +0200
commit9da03d38249a2716e7ede5d20948759e6d975138 (patch)
treed6666937b32e3b65e71caaf4511f164e7818ef04 /vernac
parent3fe764dd8d6578adddb01b02bafc7f31d9cb776c (diff)
parenteec5145a5c6575d04b5ab442597fb52913daed29 (diff)
Merge PR#417: No cast surgery in let in
Diffstat (limited to 'vernac')
-rw-r--r--vernac/classes.mli4
-rw-r--r--vernac/command.ml16
-rw-r--r--vernac/command.mli10
-rw-r--r--vernac/record.ml6
-rw-r--r--vernac/record.mli2
5 files changed, 19 insertions, 19 deletions
diff --git a/vernac/classes.mli b/vernac/classes.mli
index d2cb788eae..69ea841582 100644
--- a/vernac/classes.mli
+++ b/vernac/classes.mli
@@ -42,7 +42,7 @@ val new_instance :
?global:bool -> (** Not global by default. *)
?refine:bool -> (** Allow refinement *)
Decl_kinds.polymorphic ->
- local_binder list ->
+ local_binder_expr list ->
typeclass_constraint ->
(bool * constr_expr) option ->
?generalize:bool ->
@@ -63,4 +63,4 @@ val id_of_class : typeclass -> Id.t
(** returns [false] if, for lack of section, it declares an assumption
(unless in a module type). *)
-val context : Decl_kinds.polymorphic -> local_binder list -> bool
+val context : Decl_kinds.polymorphic -> local_binder_expr list -> bool
diff --git a/vernac/command.ml b/vernac/command.ml
index 4b4f4d2711..8244ee5346 100644
--- a/vernac/command.ml
+++ b/vernac/command.ml
@@ -55,7 +55,7 @@ let rec under_binders env sigma f n c =
let rec complete_conclusion a cs = function
| CProdN (loc,bl,c) -> CProdN (loc,bl,complete_conclusion a cs c)
- | CLetIn (loc,b,t,c) -> CLetIn (loc,b,t,complete_conclusion a cs c)
+ | CLetIn (loc,na,b,t,c) -> CLetIn (loc,na,b,t,complete_conclusion a cs c)
| CHole (loc, k, _, _) ->
let (has_no_args,name,params) = a in
if not has_no_args then
@@ -370,7 +370,7 @@ type structured_one_inductive_expr = {
}
type structured_inductive_expr =
- local_binder list * structured_one_inductive_expr list
+ local_binder_expr list * structured_one_inductive_expr list
let minductive_message warn = function
| [] -> error "No inductive definition."
@@ -416,7 +416,7 @@ let rec check_anonymous_type ind =
match ind with
| GSort (_, GType []) -> true
| GProd (_, _, _, _, e)
- | GLetIn (_, _, _, e)
+ | GLetIn (_, _, _, _, e)
| GLambda (_, _, _, _, e)
| GApp (_, e, _)
| GCast (_, e, _) -> check_anonymous_type e
@@ -560,10 +560,10 @@ let check_named (loc, na) = match na with
let check_param = function
-| LocalRawDef (na, _) -> check_named na
-| LocalRawAssum (nas, Default _, _) -> List.iter check_named nas
-| LocalRawAssum (nas, Generalized _, _) -> ()
-| LocalPattern _ -> assert false
+| CLocalDef (na, _, _) -> check_named na
+| CLocalAssum (nas, Default _, _) -> List.iter check_named nas
+| CLocalAssum (nas, Generalized _, _) -> ()
+| CLocalPattern _ -> assert false
let interp_mutual_inductive (paramsl,indl) notations poly prv finite =
check_all_names_different indl;
@@ -830,7 +830,7 @@ type structured_fixpoint_expr = {
fix_name : Id.t;
fix_univs : lident list option;
fix_annot : Id.t Loc.located option;
- fix_binders : local_binder list;
+ fix_binders : local_binder_expr list;
fix_body : constr_expr option;
fix_type : constr_expr
}
diff --git a/vernac/command.mli b/vernac/command.mli
index 616afb91f0..bccc22ae92 100644
--- a/vernac/command.mli
+++ b/vernac/command.mli
@@ -32,7 +32,7 @@ val get_declare_definition_hook : unit -> (Safe_typing.private_constants definit
(** {6 Definitions/Let} *)
val interp_definition :
- lident list option -> local_binder list -> polymorphic -> red_expr option -> constr_expr ->
+ lident list option -> local_binder_expr list -> polymorphic -> red_expr option -> constr_expr ->
constr_expr option -> Safe_typing.private_constants definition_entry * Evd.evar_map *
Universes.universe_binders * Impargs.manual_implicits
@@ -41,13 +41,13 @@ val declare_definition : Id.t -> definition_kind ->
Globnames.global_reference Lemmas.declaration_hook -> Globnames.global_reference
val do_definition : Id.t -> definition_kind -> lident list option ->
- local_binder list -> red_expr option -> constr_expr ->
+ local_binder_expr list -> red_expr option -> constr_expr ->
constr_expr option -> unit Lemmas.declaration_hook -> unit
(** {6 Parameters/Assumptions} *)
(* val interp_assumption : env -> evar_map ref -> *)
-(* local_binder list -> constr_expr -> *)
+(* local_binder_expr list -> constr_expr -> *)
(* types Univ.in_universe_context_set * Impargs.manual_implicits *)
(** returns [false] if the assumption is neither local to a section,
@@ -78,7 +78,7 @@ type structured_one_inductive_expr = {
}
type structured_inductive_expr =
- local_binder list * structured_one_inductive_expr list
+ local_binder_expr list * structured_one_inductive_expr list
val extract_mutual_inductive_declaration_components :
(one_inductive_expr * decl_notation list) list ->
@@ -114,7 +114,7 @@ type structured_fixpoint_expr = {
fix_name : Id.t;
fix_univs : lident list option;
fix_annot : Id.t Loc.located option;
- fix_binders : local_binder list;
+ fix_binders : local_binder_expr list;
fix_body : constr_expr option;
fix_type : constr_expr
}
diff --git a/vernac/record.ml b/vernac/record.ml
index b494430c28..51d89f1551 100644
--- a/vernac/record.ml
+++ b/vernac/record.ml
@@ -108,9 +108,9 @@ let typecheck_params_and_fields def id pl t ps nots fs =
| _ -> ()
in
List.iter
- (function LocalRawDef (b, _) -> error default_binder_kind b
- | LocalRawAssum (ls, bk, ce) -> List.iter (error bk) ls
- | LocalPattern (loc,_,_) ->
+ (function CLocalDef (b, _, _) -> error default_binder_kind b
+ | CLocalAssum (ls, bk, ce) -> List.iter (error bk) ls
+ | CLocalPattern (loc,_,_) ->
Loc.raise ~loc (Stream.Error "pattern with quote not allowed in record parameters.")) ps
in
let impls_env, ((env1,newps), imps) = interp_context_evars env0 evars ps in
diff --git a/vernac/record.mli b/vernac/record.mli
index c50e577860..3fd651db90 100644
--- a/vernac/record.mli
+++ b/vernac/record.mli
@@ -39,7 +39,7 @@ val declare_structure :
val definition_structure :
inductive_kind * Decl_kinds.polymorphic * Decl_kinds.recursivity_kind *
- plident with_coercion * local_binder list *
+ plident with_coercion * local_binder_expr list *
(local_decl_expr with_instance with_priority with_notation) list *
Id.t * constr_expr option -> global_reference