X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Futf8_macros%2Fpa_unicode_macro.ml;h=dda7d4cabc852161144df5a893c1dfc253985d0e;hb=6f0e3275c5a100568c8529d6c58150ef4af692d0;hp=88ba8b5a8f97f044e494a4a652687c2dcf25c389;hpb=708d2e2da7e5cfae98d69b325db56960e33fd38f;p=helm.git diff --git a/helm/ocaml/utf8_macros/pa_unicode_macro.ml b/helm/ocaml/utf8_macros/pa_unicode_macro.ml index 88ba8b5a8..dda7d4cab 100644 --- a/helm/ocaml/utf8_macros/pa_unicode_macro.ml +++ b/helm/ocaml/utf8_macros/pa_unicode_macro.ml @@ -23,8 +23,10 @@ * http://helm.cs.unibo.it/ *) +(* $Id$ *) + let debug = false -let debug_print s = if debug then prerr_endline s +let debug_print s = if debug then prerr_endline (Lazy.force s) let loc = let dummy_pos = @@ -34,7 +36,7 @@ let loc = (dummy_pos, dummy_pos) let expand_unicode_macro macro = - debug_print (Printf.sprintf "Expanding macro '%s' ..." macro); + debug_print (lazy (Printf.sprintf "Expanding macro '%s' ..." macro)); let expansion = Utf8Macro.expand macro in <:expr< $str:expansion$ >> @@ -53,7 +55,7 @@ EXTEND (String.sub q 0 pos, String.sub q (pos + 1) (String.length q - pos - 1)) in - debug_print (Printf.sprintf "QUOTATION = %s; ARG = %s" quotation arg); + debug_print (lazy (Printf.sprintf "QUOTATION = %s; ARG = %s" quotation arg)); if quotation = "unicode" then let text = TXtok (loc, x, expand_unicode_macro arg) in {used = []; text = text; styp = STlid (loc, "string")}