aboutsummaryrefslogtreecommitdiffhomepage
path: root/printing/pputils.ml
blob: ee1a39efd33eb090ad2ff529457820a91bc8db50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(************************************************************************)
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team     *)
(* <O___,, *   INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2015     *)
(*   \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