Project

General

Profile

« Previous | Next » 

Revision 7ee5f69e

Added by LĂ©lio Brun 9 months ago

corrections on loggers + spec in AST

View differences:

src/utils/utils.ml
393 393
    print_string end_str
394 394

  
395 395
let pp_iset fmt t =
396
  begin
397
    Format.fprintf fmt "{@ ";
398
    ISet.iter (fun s -> Format.fprintf fmt "%s@ " s) t;
399
    Format.fprintf fmt "}@."
400
  end
401

  
402
let pp_imap pp_val fmt m =
403
  begin
404
    Format.fprintf fmt "@[{@ ";
405
    IMap.iter (fun key v -> Format.fprintf fmt "%s -> %a@ " key pp_val v) m;
406
    Format.fprintf fmt "}@ @]"
407
  end
408
    
396
  Format.fprintf fmt "@[<hv 0>@[<hv 2>{";
397
  ISet.iter (fun s -> Format.fprintf fmt "@ %s" s) t;
398
  Format.fprintf fmt "@]@ }@]"
399

  
400
let pp_imap ?(comment="") pp_val fmt m =
401
  Format.fprintf fmt "@[<hv 0>@[<hv 2>{ %s" comment;
402
  IMap.iter (fun key v -> Format.fprintf fmt "@ %s -> %a" key pp_val v) m;
403
  Format.fprintf fmt "@]@ }@]"
404

  
409 405
let pp_hashtbl t pp_fun beg_str end_str sep_str =
410 406
  if (beg_str="\n") then
411 407
    print_newline ()

Also available in: Unified diff