diff options
| -rw-r--r-- | interp/notation.ml | 4 | ||||
| -rw-r--r-- | kernel/term.ml | 5 | ||||
| -rw-r--r-- | kernel/term.mli | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/interp/notation.ml b/interp/notation.ml index d5e27841ab..09edd7b30a 100644 --- a/interp/notation.ml +++ b/interp/notation.ml @@ -111,6 +111,9 @@ let subst_scope (subst,sc) = sc open Libobject +let discharge_scope (_,(local,_,_ as o)) = + if local then None else Some o + let classify_scope (local,_,_ as o) = if local then Dispose else Substitute o @@ -119,6 +122,7 @@ let inScope = cache_function = cache_scope; open_function = open_scope; subst_function = subst_scope; + discharge_function = discharge_scope; classify_function = classify_scope } let open_close_scope (local,opening,sc) = diff --git a/kernel/term.ml b/kernel/term.ml index 88bc4cc4ec..0e0d598a08 100644 --- a/kernel/term.ml +++ b/kernel/term.ml @@ -901,6 +901,11 @@ let mkNamedLambda_or_LetIn (id,body,t) c = | Some b -> mkNamedLetIn id b t c (* Constructs either [(x:t)c] or [c] where [x] is replaced by [b] *) +let mkProd_wo_LetIn (na,body,t) c = + match body with + | None -> mkProd (na, t, c) + | Some b -> subst1 b c + let mkNamedProd_wo_LetIn (id,body,t) c = match body with | None -> mkNamedProd id t c diff --git a/kernel/term.mli b/kernel/term.mli index 9b41025a6c..10f51b7acb 100644 --- a/kernel/term.mli +++ b/kernel/term.mli @@ -359,6 +359,7 @@ val rel_context_nhyps : rel_context -> int (** Constructs either [(x:t)c] or [[x=b:t]c] *) val mkProd_or_LetIn : rel_declaration -> types -> types +val mkProd_wo_LetIn : rel_declaration -> types -> types val mkNamedProd_or_LetIn : named_declaration -> types -> types val mkNamedProd_wo_LetIn : named_declaration -> types -> types |
