Cudf_printerSourcePretty printing of CUDF macro-components (documents, stanzas, ...)
For pretty printing of micro-components see Cudf_types_pp.
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
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 ->
unitval pp_request_gen :
pp_property:('out -> (string * string) -> unit) ->
'out ->
Cudf.request ->
unitval pp_preamble_gen :
pp_property:('out -> (string * string) -> unit) ->
'out ->
Cudf.preamble ->
unitval pp_universe_gen :
pp_package:('out -> Cudf.package -> unit) ->
pp_sep:('out -> unit) ->
'out ->
Cudf.universe ->
unitval pp_packages_gen :
pp_package:('out -> Cudf.package -> unit) ->
pp_sep:('out -> unit) ->
'out ->
Cudf.package list ->
unitval 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 ->
unitval 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 ->
unitval pp_solution_gen :
pp_preamble:('out -> Cudf.preamble -> unit) ->
pp_universe:('out -> Cudf.universe -> unit) ->
pp_sep:('out -> unit) ->
'out ->
Cudf.solution ->
unitval 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