package catala

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

Install

Dune Dependency

Authors

Maintainers

Sources

0.9.0.tar.gz
md5=8f891209d18b6540df9c34b2d1a6a783
sha512=737770b87a057674bceefe77e8526720732552f51f424afcebcb6a628267eab522c4fd993caca1ae8ed7ace65a4a87e485af10c1676e51ca5939509a1b841ac2

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

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 : Shared_ast__.Definitions.decl_ctx -> Format.formatter -> Shared_ast__.Definitions.naked_typ Catala_utils.Mark.pos -> 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 except : Format.formatter -> Shared_ast__.Definitions.except -> 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.

Generic expression printer interface

Sourcemodule type EXPR_PARAM = sig ... end
Sourcemodule ExprGen (_ : EXPR_PARAM) : sig ... end

Debugging versions that don't require a context

Sourceval typ_debug : Format.formatter -> Shared_ast__.Definitions.naked_typ Catala_utils.Mark.pos -> unit
Sourceval scope : ?debug:bool -> Shared_ast__.Definitions.decl_ctx -> Format.formatter -> (Shared_ast__.Definitions.ScopeName.t * (('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

OCaml

Innovation. Community. Security.