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.7.0.tar.gz
md5=6dbbc2f50c23693f26ab6f048e78172f
sha512=a5701e14932d8a866e2aa3731f76df85ff2a68b4fa943fd510c535913573274d66eaec1ae6fcae17f20b475876048a9ab196ef6d8c23d4ea6b90b986aa0a6daa

doc/catala.utils/Utils/Cli/index.html

Module Utils.CliSource

Sourcetype backend_lang =
  1. | En
  2. | Fr
  3. | Pl
Sourcetype backend_option_builtin = [
  1. | `Latex
  2. | `Makefile
  3. | `Html
  4. | `Interpret
  5. | `Typecheck
  6. | `OCaml
  7. | `Python
  8. | `Scalc
  9. | `Lcalc
  10. | `Dcalc
  11. | `Scopelang
  12. | `Proof
]
Sourcetype 'a backend_option = [
  1. | backend_option_builtin
  2. | `Plugin of 'a
]
Sourceval backend_option_to_string : string backend_option -> string

backend_option_to_string backend returns the string representation of the given backend.

Sourceval backend_option_of_string : string -> string backend_option

backend_option_of_string backend returns the backend_option corresponding to the backend string.

Configuration globals

Sourceval source_files : string list ref

Source files to be compiled

Sourceval locale_lang : backend_lang ref
Sourceval contents : string ref
Sourceval debug_flag : bool ref
Sourceval style_flag : bool ref

Styles the terminal output

Sourceval optimize_flag : bool ref
Sourceval max_prec_digits : int ref

Max number of digits to show for decimal results

Sourceval trace_flag : bool ref
Sourceval disable_counterexamples : bool ref

Disables model-generated counterexamples for proofs that fail.

Sourceval avoid_exceptions_flag : bool ref

Avoids using try ... with exceptions when compiling the default calculus.

CLI terms

Sourceval file : string Cmdliner.Term.t
Sourceval debug : bool Cmdliner.Term.t
Sourceval unstyled : bool Cmdliner.Term.t
Sourceval trace_opt : bool Cmdliner.Term.t
Sourceval wrap_weaved_output : bool Cmdliner.Term.t
Sourceval print_only_law : bool Cmdliner.Term.t
Sourceval backend : string Cmdliner.Term.t
Sourceval plugins_dirs : string list Cmdliner.Term.t
Sourceval language : string option Cmdliner.Term.t
Sourceval max_prec_digits_opt : int option Cmdliner.Term.t
Sourceval ex_scope : string option Cmdliner.Term.t
Sourceval output : string option Cmdliner.Term.t
Sourcetype when_enum =
  1. | Auto
  2. | Always
  3. | Never

The usual auto/always/never option argument

Sourcetype options = {
  1. debug : bool;
  2. color : when_enum;
  3. wrap_weaved_output : bool;
  4. avoid_exceptions : bool;
  5. backend : string;
  6. plugins_dirs : string list;
  7. language : string option;
  8. max_prec_digits : int option;
  9. trace : bool;
  10. disable_counterexamples : bool;
  11. optimize : bool;
  12. ex_scope : string option;
  13. output_file : string option;
  14. closure_conversion : bool;
  15. print_only_law : bool;
}

Command-line application

Sourceval catala_t : (string -> options -> 'a) -> 'a Cmdliner.Term.t

Main entry point: catala_t file options

Sourceval set_option_globals : options -> unit
Sourceval version : string

Terminal formatting

Markers

Sourceval with_style : ANSITerminal.style list -> ('a, unit, string) format -> 'a
Sourceval format_with_style : ANSITerminal.style list -> Format.formatter -> string -> unit
Sourceval call_unstyled : (unit -> 'a) -> 'a

call_unstyled f calls the function f with the style_flag set to false during the execution.

Sourceval debug_marker : unit -> string
Sourceval error_marker : unit -> string
Sourceval warning_marker : unit -> string
Sourceval result_marker : unit -> string
Sourceval log_marker : unit -> string

Printers

All the printers below print their argument after the correct marker

Sourceval concat_with_line_depending_prefix_and_suffix : (int -> string) -> (int -> string) -> string list -> string
Sourceval add_prefix_to_each_line : string -> (int -> string) -> string

The int argument of the prefix corresponds to the line number, starting at 0

Sourceval debug_print : ('a, out_channel, unit) format -> 'a
Sourceval debug_format : ('a, Format.formatter, unit) format -> 'a
Sourceval error_print : ('a, out_channel, unit) format -> 'a
Sourceval warning_print : ('a, out_channel, unit) format -> 'a
Sourceval result_print : ('a, out_channel, unit) format -> 'a
Sourceval result_format : ('a, Format.formatter, unit) format -> 'a
Sourceval log_print : ('a, out_channel, unit) format -> 'a
Sourceval log_format : ('a, Format.formatter, unit) format -> 'a
OCaml

Innovation. Community. Security.