Frama-C:
Plug-ins:
Libraries:

Frama-C API - Pretty

This module provides pretty printing utilities. Same as Pretty_utils but without dependencies to Fclib.List or Fclib.Array.

  • since Frama-C+dev
type 'a aformatter = Stdlib.Format.formatter -> 'a -> unit

Formatter for "%a" format

type tformatter = Stdlib.Format.formatter -> unit

Formatter for "%t" format

type nonrec 'a format = ('a, Stdlib.Format.formatter, unit) Stdlib.format

Formats used with fprintf and alike.

val pretty_seq : format:(tformatter -> unit) format -> item:('a aformatter -> 'a -> unit) format -> sep:unit format -> ?last:unit format -> ?empty:unit format -> 'a aformatter -> 'a Stdlib.Seq.t aformatter

Pretty prints a sequence.

  • parameter format

    defines the format used to print the collection, e.g. "@%t@"

  • parameter item

    defines the format for an item of the collection, e.g. "@%a@"

  • parameter sep

    defines the format for the separator between items, e.g "@;,"

  • parameter last

    defines the format for the last separator, defaults to sep

  • parameter empty

    defines the format for empty sequences, defaults to format