aboutsummaryrefslogtreecommitdiffhomepage
path: root/checker/declarations.ml
diff options
context:
space:
mode:
Diffstat (limited to 'checker/declarations.ml')
-rw-r--r--checker/declarations.ml13
1 files changed, 8 insertions, 5 deletions
diff --git a/checker/declarations.ml b/checker/declarations.ml
index 32d1713a8..2f6eeba1d 100644
--- a/checker/declarations.ml
+++ b/checker/declarations.ml
@@ -517,11 +517,14 @@ let map_decl_arity f g = function
| RegularArity a -> RegularArity (f a)
| TemplateArity a -> TemplateArity (g a)
-
-let subst_rel_declaration sub (id,copt,t as x) =
- let copt' = Option.smartmap (subst_mps sub) copt in
- let t' = subst_mps sub t in
- if copt == copt' && t == t' then x else (id,copt',t')
+let subst_rel_declaration sub = function
+ | LocalAssum (id,t) as x ->
+ let t' = subst_mps sub t in
+ if t == t' then x else LocalAssum (id,t')
+ | LocalDef (id,c,t) as x ->
+ let c' = subst_mps sub c in
+ let t' = subst_mps sub t in
+ if c == c' && t == t' then x else LocalDef (id,c',t')
let subst_rel_context sub = List.smartmap (subst_rel_declaration sub)