From b51eac830d2be726db06ae6d2539a81b41e90677 Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Wed, 12 Oct 2016 16:58:04 +0200 Subject: [toplevel] Remove duplicate beautify flags. Given the current style in flags.mli no reason to have a function. A deeper question is why a global flag is needed, in particular the use in `interp/constrextern.ml` seems strange, the condition in the lexer should be looked at and I'm not sure about `printing/`. --- printing/ppconstr.ml | 2 +- printing/pputils.ml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'printing') diff --git a/printing/ppconstr.ml b/printing/ppconstr.ml index c94650f1e..aa94fb7be 100644 --- a/printing/ppconstr.ml +++ b/printing/ppconstr.ml @@ -129,7 +129,7 @@ end) = struct str "`" ++ str hd ++ c ++ str tl let pr_com_at n = - if Flags.do_beautify() && not (Int.equal n 0) then comment (CLexer.extract_comments n) + if !Flags.beautify && not (Int.equal n 0) then comment (CLexer.extract_comments n) else mt() let pr_with_comments loc pp = pr_located (fun x -> x) (loc,pp) diff --git a/printing/pputils.ml b/printing/pputils.ml index 57a1d957e..50ce56fb0 100644 --- a/printing/pputils.ml +++ b/printing/pputils.ml @@ -9,7 +9,7 @@ open Pp let pr_located pr (loc, x) = - if Flags.do_beautify () && loc <> Loc.ghost then + if !Flags.beautify && loc <> Loc.ghost then let (b, e) = Loc.unloc loc in (* Side-effect: order matters *) let before = Pp.comment (CLexer.extract_comments b) in -- cgit v1.2.3