pp.mli 4.55 KB
Newer Older
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
1 2
(**************************************************************************)
(*                                                                        *)
3 4 5 6 7
(*  Copyright (C) 2010-                                                   *)
(*    Francois Bobot                                                      *)
(*    Jean-Christophe Filliatre                                           *)
(*    Johannes Kanig                                                      *)
(*    Andrei Paskevich                                                    *)
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
(*                                                                        *)
(*  This software is free software; you can redistribute it and/or        *)
(*  modify it under the terms of the GNU Library General Public           *)
(*  License version 2.1, with the special exception on linking            *)
(*  described in file LICENSE.                                            *)
(*                                                                        *)
(*  This software is distributed in the hope that it will be useful,      *)
(*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *)
(*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                  *)
(*                                                                        *)
(**************************************************************************)

(*i $Id: pp.mli,v 1.22 2009-10-19 11:55:33 bobot Exp $ i*)

open Format

val print_option : (formatter -> 'a -> unit) -> formatter -> 'a option -> unit
val print_option_or_default :
  string -> (formatter -> 'a -> unit) -> formatter -> 'a option -> unit
val print_list : 
  (formatter -> unit -> unit) -> 
  (formatter -> 'a -> unit) -> formatter -> 'a list -> unit
val print_list_or_default :
  string -> (formatter -> unit -> unit) -> 
  (formatter -> 'a -> unit) -> formatter -> 'a list -> unit
val print_list_par :
  (Format.formatter -> unit -> 'a) ->
  (Format.formatter -> 'b -> unit) -> Format.formatter -> 'b list -> unit
val print_list_delim :
  (Format.formatter -> unit -> unit) ->
  (Format.formatter -> unit -> unit) ->
  (Format.formatter -> unit -> unit) ->
  (Format.formatter -> 'b -> unit) -> Format.formatter -> 'b list -> unit
Francois Bobot's avatar
Francois Bobot committed
41

Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
42 43 44 45 46 47
val print_pair_delim :
  (Format.formatter -> unit -> unit) ->
  (Format.formatter -> unit -> unit) ->
  (Format.formatter -> unit -> unit) ->
  (Format.formatter -> 'a -> unit) -> 
  (Format.formatter -> 'b -> unit) -> Format.formatter -> 'a * 'b -> unit
Francois Bobot's avatar
Francois Bobot committed
48 49 50
val print_pair :
  (Format.formatter -> 'a -> unit) -> 
  (Format.formatter -> 'b -> unit) -> Format.formatter -> 'a * 'b -> unit
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65

val print_iter1 : 
  (('a -> unit) -> 'b -> unit) ->
  (Format.formatter -> unit -> unit) -> 
  (Format.formatter -> 'a -> unit) -> 
  Format.formatter -> 'b -> unit

val print_iter2: 
  (('a -> 'b -> unit) -> 'c -> unit) ->
  (Format.formatter -> unit -> unit) ->
  (Format.formatter -> unit -> unit) ->
  (Format.formatter -> 'a -> unit) -> 
  (Format.formatter -> 'b -> unit) -> 
  Format.formatter -> 'c -> unit

Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
66 67 68
val space : formatter -> unit -> unit
val alt : formatter -> unit -> unit
val newline : formatter -> unit -> unit
69
val newline2 : formatter -> unit -> unit
70
val dot : formatter -> unit -> unit
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
71 72 73 74
val comma : formatter -> unit -> unit
val simple_comma : formatter -> unit -> unit
val semi : formatter -> unit -> unit
val underscore : formatter -> unit -> unit
Francois Bobot's avatar
Francois Bobot committed
75
val equal : formatter -> unit -> unit
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
76 77 78 79 80 81 82 83 84 85 86 87 88
val arrow : formatter -> unit -> unit
val lbrace : formatter -> unit -> unit
val rbrace : formatter -> unit -> unit
val lsquare : formatter -> unit -> unit
val rsquare : formatter -> unit -> unit
val lparen : formatter -> unit -> unit
val rparen : formatter -> unit -> unit
val lchevron : formatter -> unit -> unit
val rchevron : formatter -> unit -> unit
val nothing : formatter -> 'a -> unit
val string : formatter -> string -> unit
val constant_string : string -> formatter -> unit -> unit
val hov : int -> formatter -> ('a -> unit) -> 'a -> unit
89 90
val add_flush : (formatter -> 'a -> unit) -> formatter -> 'a -> unit

Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
91 92 93 94 95

val open_formatter : ?margin:int -> out_channel -> formatter
val close_formatter : formatter -> unit
val open_file_and_formatter : ?margin:int -> string -> out_channel * formatter
val close_file_and_formatter : out_channel * formatter -> unit
96 97
val print_in_file_no_close : 
  ?margin:int -> (Format.formatter -> unit) -> string -> out_channel
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
98
val print_in_file : ?margin:int -> (Format.formatter -> unit) -> string -> unit
99 100 101 102 103


val print_list_opt : 
  (formatter -> unit -> unit) -> 
  (formatter -> 'a -> bool) -> formatter -> 'a list -> bool
MARCHE Claude's avatar
MARCHE Claude committed
104 105 106


val string_of : (Format.formatter -> 'a -> unit) -> 'a -> string