diff options
author | ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-10-04 11:53:07 +0000 |
---|---|---|
committer | ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-10-04 11:53:07 +0000 |
commit | 5b6582f8d47975f6f4f394cf44a1c65c799d43ff (patch) | |
tree | e1be15920daf8b2e5ae788f57e772e79ddaacd30 /printing/pputils.ml | |
parent | 621625757d04bdb19075d92e764749d0a1393ce3 (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 'printing/pputils.ml')
-rw-r--r-- | printing/pputils.ml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/printing/pputils.ml b/printing/pputils.ml new file mode 100644 index 000000000..0c54c6181 --- /dev/null +++ b/printing/pputils.ml @@ -0,0 +1,15 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2012 *) +(* \VV/ **************************************************************) +(* // * This file is distributed under the terms of the *) +(* * GNU Lesser General Public License Version 2.1 *) +(************************************************************************) + +open Pp + +let pr_located pr (loc, x) = + if Flags.do_beautify () && loc <> Loc.ghost then + let (b, e) = Loc.unloc loc in + Pp.comment b ++ pr x ++ Pp.comment e + else pr x |