mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
403156b36e
This includes a few separate changes: - pass visibility information of declarations (depending on wether the declaration was in a ```catala-metadata block or not) - add reasonable hash computation functions to discriminate the interfaces. In particular: * Uids have a `hash` function that depends on their string, but not on their actual uid (which is not stable between runs of the compiler) ; the existing `hash` function and its uses have been renamed to `id`. * The `Hash` module provides the tools to properly combine hashes, etc. While we rely on `Hashtbl.hash` for the atoms, we take care not to use it on any recursive structure (it relies on a bounded traversal). - insert the hashes in the artefacts, and properly check and report those (for OCaml) **Remains to do**: - Record and check the hashes in the other backends - Provide a way to get stable inline-test outputs in the presence of module hashes - Provide a way to write external modules that don't break at every Catala update. |
||
---|---|---|
.. | ||
api_web.ml | ||
dune | ||
explain.ml | ||
json_schema.ml | ||
lazy_interp.ml | ||
plugins.mld | ||
python.ml | ||
README.md |
Catala compiler plugins
You want to add a customized backend for the Catala compiler but don't want to modify its source code? Thanks to dynamic linking, it is possible to do so. The advantage of creating a customized backend is the possibility to craft a generated target code that perfectly matches the naming conventions, module structure or coding style of your application.
See the online documentation for more details on how to create them, or look at the existing plugins in this directory for inspiration.