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.3.0.tar.gz
md5=59d0dd01df52c38a4d793b594f067d14
sha512=944b755f8b47cb14920994f03f022cc3ba6cdf5def1ae8ffda00a196fa97dcc5b57baf642a03068b79e949df2a98d5f0218e3358e549be1ff0f1cddda1e5f848

doc/catala.runtime_ocaml/Catala_runtime/Value/index.html

Module Catala_runtime.ValueSource

Sourcetype _ external_tag = ..
Sourcemodule type External = sig ... end
Sourcetype _ ty =
  1. | Unit : unit ty
  2. | Bool : bool ty
  3. | Integer : integer ty
  4. | Money : money ty
  5. | Decimal : decimal ty
  6. | Date : date ty
  7. | Duration : duration ty
  8. | Position : code_location ty
  9. | Array : ('a -> t) -> 'a array ty
  10. | Tuple : ('a -> t list) -> 'a ty
  11. | Struct : {
    1. name : string;
    2. fields : 'a -> (string * t) list;
    } -> 'a ty
  12. | Enum : {
    1. name : string;
    2. constr : 'a -> int * string * t option;
    } -> 'a ty
  13. | External : (module External with type t = 'a) -> 'a ty
  14. | Function : 'a ty
  15. | Polymorphic : 'a ty

'a ty provides runtime information about the structure of values of OCaml type 'a

Sourceand t =
  1. | V : 'a ty * 'a -> t

Runtime.Value.t is an embedded runtime value that comes with type information, allowing for introspection

Sourceval embed : 'a ty -> 'a -> t
Sourceval equal : code_location -> t -> t -> bool
Sourceval compare : code_location -> t -> t -> int
Sourceval format : Format.formatter -> t -> unit
Sourceval from_json : 'a ty -> code_location -> string -> 'a