package catala

  1. Overview
  2. Docs
Compiler and library for the literate programming language for tax code specification

Install

dune-project
 Dependency

Authors

Maintainers

Sources

1.0.0.tar.gz
md5=42196e9a9c5e12839b38cb3da935f10c
sha512=ede2d8c17dcb936c1c8c596f1453bf89370a2f824a190efe74e438d7d7f7f83875c1ecbc18219c6a8a3e98b3ab4da1c3a6cc4e534687dbc90f3dca8230f43f7b

doc/catala.shared_ast/Shared_ast/Print/index.html

Module Shared_ast.PrintSource

Printing functions for the default calculus AST

Common syntax highlighting helpers

Sourceval base_type : Format.formatter -> string -> unit
Sourceval keyword : Format.formatter -> string -> unit
Sourceval punctuation : Format.formatter -> string -> unit

The argument is assumed to be 1-column wide (but can be a multi-char utf8 character)

Sourceval op_style : Format.formatter -> string -> unit
Sourceval lit_style : Format.formatter -> string -> unit
Sourceval lit_uchar_style : Format.formatter -> string -> unit

Some basic stringifiers

Sourceval operator_to_string : 'a Shared_ast__.Definitions.Op.t -> string

Prints the operator symbols with kind suffixes, as expected by the OCaml backend (e.g. "+^", "+$", etc.)

Formatters

Sourceval tlit : Format.formatter -> Shared_ast__.Definitions.typ_lit -> unit
Sourceval location : Format.formatter -> 'a Shared_ast__.Definitions.glocation -> unit
Sourceval external_ref : Format.formatter -> Shared_ast__.Definitions.external_ref Catala_utils.Mark.pos -> unit
Sourceval typ : Format.formatter -> Shared_ast__.Definitions.naked_typ Catala_utils.Mark.pos -> unit
Sourceval tvar : Format.formatter -> Shared_ast__.Definitions.naked_typ Bindlib.var -> unit
Sourceval lit : Format.formatter -> Shared_ast__.Definitions.lit -> unit
Sourceval operator : ?debug:bool -> Format.formatter -> 'a Shared_ast__.Definitions.Op.t -> unit
Sourceval log_entry : Format.formatter -> Shared_ast__.Definitions.log_entry -> unit
Sourceval runtime_error : Format.formatter -> Catala_runtime.error -> unit
Sourceval var : Format.formatter -> 'e Var.t -> unit
Sourceval var_debug : Format.formatter -> 'e Var.t -> unit
Sourceval expr : ?debug:bool -> unit -> Format.formatter -> (('a, 'a, 'm) Shared_ast__.Definitions.base_gexpr, 'm Shared_ast__.Definitions.mark) Catala_utils.Mark.ed -> unit

Expression printer.

  • parameter debug

    (default to the global setting) turns on printing of logging nodes, variable indices and operator suffixes. See the interface below for more detailed control.

Sourceval s_expr : Format.formatter -> ((_, _, _) Shared_ast__.Definitions.base_gexpr, _ Shared_ast__.Definitions.mark) Catala_utils.Mark.ed -> unit

S-expression printer for all AST nodes.

Generic expression printer interface

Sourcemodule type EXPR_PARAM = sig ... end
Sourcemodule ExprGen (_ : EXPR_PARAM) : sig ... end
Sourceval decl_ctx : ?debug:bool -> Format.formatter -> Shared_ast__.Definitions.decl_ctx -> unit
Sourceval scope : ?debug:bool -> Format.formatter -> (string * (('a, 'a, 'm) Shared_ast__.Definitions.base_gexpr, 'm Shared_ast__.Definitions.mark) Catala_utils.Mark.ed Shared_ast__.Definitions.scope_body) -> unit
Sourceval program : ?debug:bool -> Format.formatter -> (('a, 'a, 'm) Shared_ast__.Definitions.base_gexpr, 'm Shared_ast__.Definitions.mark) Catala_utils.Mark.ed Shared_ast__.Definitions.program -> unit
Sourcemodule UserFacing : sig ... end

User-facing, localised printer

/

Sourceval skip_wrappers : (('a, 'a, 'm) Shared_ast__.Definitions.base_gexpr, 'm Shared_ast__.Definitions.mark) Catala_utils.Mark.ed -> (('a, 'a, 'm) Shared_ast__.Definitions.base_gexpr, 'm Shared_ast__.Definitions.mark) Catala_utils.Mark.ed

This is exported from Expr, but first defined here for dependency reasons