aboutsummaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authorletouzey2001-05-10 13:01:47 +0000
committerletouzey2001-05-10 13:01:47 +0000
commit7306ee7c3027983da38dde0ae7aa85c46bc943f6 (patch)
treec4527fd3102182f9f7b583ad1f93dd6d09876e7e /dev
parent7af1bbb5e411607c20d62e371c22e687baa1d7dd (diff)
ajout d'un afficher de contexte et d'une fonction constbody_of_string
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@1739 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'dev')
-rw-r--r--dev/base_include13
-rw-r--r--dev/include1
-rw-r--r--dev/top_printers.ml2
3 files changed, 14 insertions, 2 deletions
diff --git a/dev/base_include b/dev/base_include
index 3001a5be78..67a0d48f1b 100644
--- a/dev/base_include
+++ b/dev/base_include
@@ -51,8 +51,16 @@ let raw_constr_of_string = e;;
(* build a term of type constr with type-checking and resolution of
implicit syntax *)
-let constr_of_string s
- = Astterm.interp_constr Evd.empty (Global.env()) (parse_ast s);;
+let constr_of_string s =
+ Astterm.interp_constr Evd.empty (Global.env()) (parse_ast s);;
+
+(* get the body of a constant *)
+
+open Declarations;;
+
+let constbody_of_string s =
+ let b = Global.lookup_constant (path_of_string s) in
+ Util.out_some b.const_body;;
(* Get the current goal *)
@@ -66,3 +74,4 @@ let pf_e gl s =
open Toplevel
let go = loop
+
diff --git a/dev/include b/dev/include
index 0603fed6f2..2a841e4583 100644
--- a/dev/include
+++ b/dev/include
@@ -24,3 +24,4 @@
#install_printer (* readable_constraints *) prevc;;
#install_printer (* walking_constraints *) prwc;;
#install_printer (* clenv *) prclenv;;
+#install_printer (* env *) ppenv;; \ No newline at end of file
diff --git a/dev/top_printers.ml b/dev/top_printers.ml
index e2a91022fa..48b12aa2ed 100644
--- a/dev/top_printers.ml
+++ b/dev/top_printers.ml
@@ -80,6 +80,8 @@ let print_uni u = (pP (pr_uni u))
let pp_universes u = pP [< 'sTR"[" ; pr_universes u ; 'sTR"]" >]
+let ppenv e = pP (pr_rel_context e (rel_context e))
+
let cnt = ref 0
let constr_display csr =