aboutsummaryrefslogtreecommitdiff
path: root/printing/printer.ml
diff options
context:
space:
mode:
authorGuillaume Melquiond2015-12-22 22:35:09 +0100
committerGuillaume Melquiond2015-12-22 22:35:09 +0100
commit602badcad9deec9224b78cd1e1033af30358ef2e (patch)
treee528188a52c4120fa94a5e0ff2c035874dee75cf /printing/printer.ml
parentd55676344c8dc0d9a87b2ef12ec2348281db4bf5 (diff)
Do not compose "str" and "to_string" whenever possible.
For instance, calling only Id.print is faster than calling both str and Id.to_string, since the latter performs a copy. It also makes the code a bit simpler to read.
Diffstat (limited to 'printing/printer.ml')
-rw-r--r--printing/printer.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/printing/printer.ml b/printing/printer.ml
index 2e112f9ace..7c031ea536 100644
--- a/printing/printer.ml
+++ b/printing/printer.ml
@@ -777,7 +777,7 @@ let pr_assumptionset env s =
let (v, a, o, tr) = accu in
match t with
| Variable id ->
- let var = str (Id.to_string id) ++ str " : " ++ pr_ltype typ in
+ let var = pr_id id ++ str " : " ++ pr_ltype typ in
(var :: v, a, o, tr)
| Axiom (kn,[]) ->
let ax = safe_pr_constant env kn ++ safe_pr_ltype typ in
@@ -786,7 +786,7 @@ let pr_assumptionset env s =
let ax = safe_pr_constant env kn ++ safe_pr_ltype typ ++
cut() ++
prlist_with_sep cut (fun (lbl, ctx, ty) ->
- str " used in " ++ str (Names.Label.to_string lbl) ++
+ str " used in " ++ pr_label lbl ++
str " to prove:" ++ safe_pr_ltype_relctx (ctx,ty))
l in
(v, ax :: a, o, tr)