Module Cudf_printer

module Cudf_printer: sig .. end
Pretty printing of CUDF macro-components (documents, stanzas, ...)

For pretty printing of micro-components see Cudf_types_pp.



Pretty print to standard output channels

val pp_cudf : Pervasives.out_channel -> Cudf.cudf -> unit
val pp_doc : Pervasives.out_channel -> Cudf.cudf_doc -> unit
val pp_solution : Pervasives.out_channel -> Cudf.solution -> unit
val pp_item : Pervasives.out_channel -> Cudf.cudf_item -> unit
val pp_package : Pervasives.out_channel -> Cudf.package -> unit
val pp_preamble : Pervasives.out_channel -> Cudf.preamble -> unit
val pp_request : Pervasives.out_channel -> Cudf.request -> unit
val pp_packages : Pervasives.out_channel -> Cudf.package list -> unit
val pp_universe : Pervasives.out_channel -> Cudf.universe -> unit

Pretty print to abstract output channels

Note: you can write to string using these methods using the following pattern:

let o = IO.output_string () in ... Cudf_printer.pp_* o ...; IO.close_out o

val pp_io_cudf : 'a IO.output -> Cudf.cudf -> unit
val pp_io_doc : 'a IO.output -> Cudf.cudf_doc -> unit
val pp_io_solution : 'a IO.output -> Cudf.solution -> unit
val pp_io_item : 'a IO.output -> Cudf.cudf_item -> unit
val pp_io_package : 'a IO.output -> Cudf.package -> unit
val pp_io_preamble : 'a IO.output -> Cudf.preamble -> unit
val pp_io_request : 'a IO.output -> Cudf.request -> unit
val pp_io_packages : 'a IO.output -> Cudf.package list -> unit
val pp_io_universe : 'a IO.output -> Cudf.universe -> unit

Generic, higher-order pretty printers

Usually, you shouldn't need those and you should be well served by the above printers.

To bootstrap usage of the generic printers, you'll need to provide a pp_property argument --- that takes a property as a pair of name/value strings and print them on a generic output --- and then proceed composing generic printers together.

val pp_package_gen : pp_property:('out -> string * string -> unit) -> 'out -> Cudf.package -> unit
val pp_request_gen : pp_property:('out -> string * string -> unit) -> 'out -> Cudf.request -> unit
val pp_preamble_gen : pp_property:('out -> string * string -> unit) ->
'out -> Cudf.preamble -> unit
val pp_universe_gen : pp_package:('out -> Cudf.package -> unit) ->
pp_sep:('out -> unit) -> 'out -> Cudf.universe -> unit
val pp_packages_gen : pp_package:('out -> Cudf.package -> unit) ->
pp_sep:('out -> unit) -> 'out -> Cudf.package list -> unit
val pp_cudf_gen : pp_preamble:('out -> Cudf.preamble -> unit) ->
pp_universe:('out -> Cudf.universe -> unit) ->
pp_request:('out -> Cudf.request -> unit) ->
pp_sep:('out -> unit) -> 'out -> Cudf.cudf -> unit
val pp_doc_gen : pp_preamble:('out -> Cudf.preamble -> unit) ->
pp_packages:('out -> Cudf.package list -> unit) ->
pp_request:('out -> Cudf.request -> unit) ->
pp_sep:('out -> unit) -> 'out -> Cudf.cudf_doc -> unit
val pp_solution_gen : pp_preamble:('out -> Cudf.preamble -> unit) ->
pp_universe:('out -> Cudf.universe -> unit) ->
pp_sep:('out -> unit) -> 'out -> Cudf.solution -> unit
val pp_item_gen : pp_package:('out -> Cudf.package -> unit) ->
pp_request:('out -> Cudf.request -> unit) ->
pp_preamble:('out -> Cudf.preamble -> unit) -> 'out -> Cudf.cudf_item -> unit