aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorherbelin2010-09-24 22:21:29 +0000
committerherbelin2010-09-24 22:21:29 +0000
commit98b7bcfdbec5e34a8f3a1adaa141802fda4bf434 (patch)
tree5e9366f249726da85c3d8e83043104c0f261313b
parent13964049858427c5447394c733011f7a0c4f4117 (diff)
Partial review of removed dead code (r13460)
- The code detected unused in notation.ml revealed a bug. - In term.ml, restored a (short) useless function for consistency/symmetry of the interface. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13463 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--interp/notation.ml4
-rw-r--r--kernel/term.ml5
-rw-r--r--kernel/term.mli1
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