aboutsummaryrefslogtreecommitdiffhomepage
path: root/printing/printer.mli
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-03-21 21:11:17 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-03-21 21:11:17 +0000
commit5cff8a26e6444a4523eb8f471a1203a33c611b5b (patch)
treea6cdc580245c6390deb7f7b26f86bf60fe9e9a15 /printing/printer.mli
parent4da7ddb8c3c2f1dafd5d9187741659a9332b75c2 (diff)
Robust display of NotConvertibleTypeField errors (fix #3008, #2995)
Since the nametab isn't aware of everything needed to print mismatched types (cf the bug test-cases), we create a robust term printer that known how to print a fully-qualified name when [shortest_qualid_of_global] has failed. These Printer.safe_pr_constr and alii are meant to never fail (at worse they display "??", for instance when the env isn't rich enough). Moreover, the environnement may have changed between the raise of NotConvertibleTypeField and its display, so we store the original env in the exception. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16342 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'printing/printer.mli')
-rw-r--r--printing/printer.mli11
1 files changed, 11 insertions, 0 deletions
diff --git a/printing/printer.mli b/printing/printer.mli
index 2c6800a11..2bc589b63 100644
--- a/printing/printer.mli
+++ b/printing/printer.mli
@@ -32,6 +32,17 @@ val pr_lconstr : constr -> std_ppcmds
val pr_constr_env : env -> constr -> std_ppcmds
val pr_constr : constr -> std_ppcmds
+(** Same, but resilient to [Nametab] errors. Prints fully-qualified
+ names when [shortest_qualid_of_global] has failed. Prints "??"
+ in case of remaining issues (such as reference not in env). *)
+
+val safe_pr_lconstr_env : env -> constr -> std_ppcmds
+val safe_pr_lconstr : constr -> std_ppcmds
+
+val safe_pr_constr_env : env -> constr -> std_ppcmds
+val safe_pr_constr : constr -> std_ppcmds
+
+
val pr_open_constr_env : env -> open_constr -> std_ppcmds
val pr_open_constr : open_constr -> std_ppcmds