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.8.0.tar.gz
md5=1408a1cce45c7d5990b981e83e7589c2
sha512=eb3b923aa1f743378b4a05e30f50be5d180dc862a716270d747a90e469017f42fa5fc41352f02fbbf59cd2560f91c4f1b32cf38d80085b105d9387b0aed2039d

doc/catala_utils.html

Compiler utilities

Unique identifiers

In the desugared representation or in the the scope language, a number of things are named using global identifiers. These identifiers use OCaml's type system to statically distinguish e.g. a scope identifier from a struct identifier.

The Uid module provides a generative functor whose output is a fresh sort of global identifiers.

Related modules:

  • Uid

Source code positions

This module is used throughout the compiler to annotate the abstract syntax trees with information about the position of the element in the original source code. These annotations are critical to produce readable error messages.

Related modules:

  • Pos

Error messages

Error handling is critical in a compiler. The Catala compiler uses an architecture of error messages inspired by the Rust compiler, where error messages all correspond to the same exception. This exception carries messages and positions that are displayed in the end in a nicely-formatted error message.

Hence, all error thrown by the compiler should use Utils.Errors

Related modules:

  • Utils.Errors

Other utilies

Related modules:

  • Utils.File
  • Utils.String_common
OCaml

Innovation. Community. Security.