aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel/toplevel.ml
diff options
context:
space:
mode:
authorGravatar ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-10-04 11:53:07 +0000
committerGravatar ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-10-04 11:53:07 +0000
commit5b6582f8d47975f6f4f394cf44a1c65c799d43ff (patch)
treee1be15920daf8b2e5ae788f57e772e79ddaacd30 /toplevel/toplevel.ml
parent621625757d04bdb19075d92e764749d0a1393ce3 (diff)
Moved Compat to parsing. This permits to break the dependency of the
kernel on CAMLP4/5 structures, and consequently should also erase such structures from vo files. This modification requires some code duplication, mainly while reimplementing our own location data type. This is chiefly visible in the ml4 files, where CAMLP4/5 locations must be manually converted to our locations with an explicit (!@) cast operator. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15847 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'toplevel/toplevel.ml')
-rw-r--r--toplevel/toplevel.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/toplevel/toplevel.ml b/toplevel/toplevel.ml
index 74ed231d1..7e301ba0e 100644
--- a/toplevel/toplevel.ml
+++ b/toplevel/toplevel.ml
@@ -291,6 +291,12 @@ let print_toplevel_error exc =
(print_highlight_location top_buffer loc, ie)
else
((mt ()) (* print_command_location top_buffer dloc *), ie)
+ | Compat.Exc_located (loc, ie) ->
+ let loc = Compat.to_coqloc loc in
+ if valid_buffer_loc top_buffer dloc loc then
+ (print_highlight_location top_buffer loc, ie)
+ else
+ ((mt ()) (* print_command_location top_buffer dloc *), ie)
| Error_in_file (s, (inlibrary, fname, loc), ie) ->
(print_location_in_file s inlibrary fname loc, ie)
| _ ->