package catala
Install
Dune Dependency
Authors
Maintainers
Sources
md5=5abd76e8c51a47670645e91b21b57fc5
sha512=9c6fbe50c0b5a60566e877eeddadca0a339e2ce35deb5c1beceb03bc40eb6af2d519313e71859d88645b53fad591d4fa5288c633b185c9d765603da0f5b7dd7b
doc/catala.catala_utils/Catala_utils/Global/index.html
Module Catala_utils.Global
Source
This module contains definitions of global flags and types used throughout. They should be defined from the command-line and never modified afterwards.
File names ; equal to File.t
but let's avoid cyclic dependencies
A file name that has not yet been resolved, options.path_rewrite
must be called on it
The usual auto/always/never option argument
Sources for program input
Configuration globals
type options = private {
mutable input_src : file input_src;
mutable language : backend_lang option;
mutable debug : bool;
mutable color : when_enum;
mutable message_format : message_format_enum;
mutable trace : bool;
mutable plugins_dirs : file list;
mutable disable_warnings : bool;
mutable max_prec_digits : int;
mutable path_rewrite : raw_file -> file;
}
Global options, common to all subcommands (note: the fields are internally mutable only for purposes of the globals
toplevel value defined below)
A global definition to the global options is provided for convenience, e.g. choosing the proper output in formatting functions. Prefer the use of the options returned by the command-line parsing whenever possible.
val enforce_options :
?input_src:file input_src ->
?language:backend_lang option ->
?debug:bool ->
?color:when_enum ->
?message_format:message_format_enum ->
?trace:bool ->
?plugins_dirs:file list ->
?disable_warnings:bool ->
?max_prec_digits:int ->
?path_rewrite:(raw_file -> file) ->
unit ->
options
Sets up the global options (side-effect); for specific use-cases only, this should never be called from the compiler outside of the Cli
module. Other proper uses include setting up the compiler library when using it directly through a specific front-end.