From c4ac9504252a463c1250a9cfa458fcb455c73478 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Wed, 24 Oct 2007 14:40:47 +0000 Subject: [PATCH] Debugging code improved. --- components/grafite_parser/grafiteDisambiguator.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/grafite_parser/grafiteDisambiguator.ml b/components/grafite_parser/grafiteDisambiguator.ml index fc2cbc74e..8827e709b 100644 --- a/components/grafite_parser/grafiteDisambiguator.ml +++ b/components/grafite_parser/grafiteDisambiguator.ml @@ -27,6 +27,10 @@ open Printf +let debug = false;; +let debug_print s = + if debug then prerr_endline (Lazy.force s);; + exception Ambiguous_input (* the integer is an offset to be added to each location *) exception DisambiguationError of @@ -119,7 +123,7 @@ let disambiguate_thing ~aliases ~universe drop_aliases_and_clear_diff res in let rec aux i errors passes = -(*prerr_endline ("Pass: " ^ string_of_int i);*) + debug_print (lazy ("Pass: " ^ string_of_int i)); match passes with [ pass ] -> (try -- 2.39.2