aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--kernel/context.ml6
-rw-r--r--kernel/context.mli3
2 files changed, 9 insertions, 0 deletions
diff --git a/kernel/context.ml b/kernel/context.ml
index 2f4997055..ca084b682 100644
--- a/kernel/context.ml
+++ b/kernel/context.ml
@@ -340,6 +340,12 @@ struct
let of_tuple = function
| id, None, ty -> LocalAssum (id, ty)
| id, Some v, ty -> LocalDef (id, v, ty)
+
+ let of_rel f = function
+ | Rel.Declaration.LocalAssum (na,t) ->
+ LocalAssum (f na, t)
+ | Rel.Declaration.LocalDef (na,v,t) ->
+ LocalDef (f na, v, t)
end
(** Named-context is represented as a list of declarations.
diff --git a/kernel/context.mli b/kernel/context.mli
index 55ea8921b..27d0f2c1b 100644
--- a/kernel/context.mli
+++ b/kernel/context.mli
@@ -194,6 +194,9 @@ sig
val to_tuple : t -> Id.t * Constr.t option * Constr.t
val of_tuple : Id.t * Constr.t option * Constr.t -> t
+
+ (** Convert [Rel.Declaration.t] value to the corresponding [Named.Declaration.t] value. *)
+ val of_rel : (Name.t -> Id.t) -> Rel.Declaration.t -> t
end
(** Rel-context is represented as a list of declarations.