package libsail

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Libsail.Pretty_print_sailSource

Sourcemodule type PRINT_CONFIG = sig ... end

The PRINT_CONFIG module type can be used to customise the behavior of the pretty-printer

Sourcemodule Printer (Config : PRINT_CONFIG) : sig ... end

The Printer functor defines the printing function based on the supplied printing configuration

Sourceval reformat : into_directory:string -> Ast_util.untyped_ast -> unit

This function is intended to reformat machine-generated Sail into something a bit more readable, it is not intended to be used as a general purpose code formatter. The output will be dumped as multiple files into the directory argument.

The default PRINT_CONFIG sets all the options to false, so it prints the AST 'as is' without modifications.

For convenience, other modules can get the default behavior by just importing this module.

include sig ... end
Sourceval doc_binding : (Ast.typquant * Ast.typ) -> PPrint.document
Sourceval doc_typschm : Ast.typschm -> PPrint.document
Sourceval output_ast : ?line_width:int -> out_channel -> Ast_util.untyped_ast -> unit

This function is primarly used to dump the AST by debug options, such as --ddump-tc-ast.

Sourcemodule Document : sig ... end

Some convenience functions for outputting PPrint documents