aboutsummaryrefslogtreecommitdiff
path: root/vernac/topfmt.ml
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2019-04-05 21:21:53 +0200
committerEmilio Jesus Gallego Arias2019-04-25 23:42:47 +0200
commit7461f18cbe722610613bdd8c729665ac48395b6e (patch)
tree691bb2da96ca0363d599a6167ddad22ae8c316b8 /vernac/topfmt.ml
parent12e5d3cdef8b954fc3a7cdf1dfebc388bd546c3a (diff)
[vernac] [ast] Make location info an attribute of vernaculars.
This has been a mess for quite a while, we try to improve it.
Diffstat (limited to 'vernac/topfmt.ml')
-rw-r--r--vernac/topfmt.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/vernac/topfmt.ml b/vernac/topfmt.ml
index 60b0bdc7e7..fffa51f0b4 100644
--- a/vernac/topfmt.ml
+++ b/vernac/topfmt.ml
@@ -413,7 +413,7 @@ let with_output_to_file fname func input =
(* For coqtop -time, we display the position in the file,
and a glimpse of the executed command *)
-let pr_cmd_header {CAst.loc;v=com} =
+let pr_cmd_header com =
let shorten s =
if Unicode.utf8_length s > 33 then (Unicode.utf8_sub s 0 30) ^ "..." else s
in
@@ -423,7 +423,7 @@ let pr_cmd_header {CAst.loc;v=com} =
| x -> x
) s
in
- let (start,stop) = Option.cata Loc.unloc (0,0) loc in
+ let (start,stop) = Option.cata Loc.unloc (0,0) com.CAst.loc in
let safe_pr_vernac x =
try Ppvernac.pr_vernac x
with e -> str (Printexc.to_string e) in