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_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 Catala_utils.Uid module provides a generative functor whose output is a fresh sort of global identifiers.

Related modules:

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:

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 Catala_utils.Message

Related modules:

Other utilies

Related modules:

OCaml

Innovation. Community. Security.