2021-11-29 13:24:03 +03:00
|
|
|
{ lib
|
2022-08-03 18:02:13 +03:00
|
|
|
, alcotest
|
2021-11-29 13:24:03 +03:00
|
|
|
, ansiterminal
|
2022-08-03 18:02:13 +03:00
|
|
|
, benchmark
|
2021-11-29 13:24:03 +03:00
|
|
|
, bindlib
|
2022-08-03 18:02:13 +03:00
|
|
|
, buildDunePackage
|
2021-11-29 13:24:03 +03:00
|
|
|
, calendar
|
2022-12-12 13:55:22 +03:00
|
|
|
, cmdliner
|
2022-08-03 18:02:13 +03:00
|
|
|
, cppo
|
2022-09-05 16:05:52 +03:00
|
|
|
, dates_calc
|
2022-08-03 18:02:13 +03:00
|
|
|
, fetchFromGitHub
|
2021-11-29 13:24:03 +03:00
|
|
|
, js_of_ocaml
|
|
|
|
, js_of_ocaml-ppx
|
2022-08-03 18:02:13 +03:00
|
|
|
, menhir
|
2023-02-24 16:32:37 +03:00
|
|
|
, menhirLib
|
2022-08-03 18:02:13 +03:00
|
|
|
, ocamlgraph
|
|
|
|
, pkgs
|
2021-12-16 21:16:57 +03:00
|
|
|
, ppx_deriving
|
2022-05-30 15:58:25 +03:00
|
|
|
, ppx_yojson_conv
|
2022-08-03 18:02:13 +03:00
|
|
|
, re
|
|
|
|
, sedlex
|
|
|
|
, ubase
|
|
|
|
, unionfind
|
|
|
|
, visitors
|
|
|
|
, z3
|
|
|
|
, zarith
|
|
|
|
, zarith_stubs_js
|
2021-11-29 13:24:03 +03:00
|
|
|
}:
|
2021-10-29 15:45:05 +03:00
|
|
|
|
2023-02-24 16:32:37 +03:00
|
|
|
buildDunePackage {
|
2021-10-29 15:45:05 +03:00
|
|
|
pname = "catala";
|
Bump version to 0.8.0
Changelog:
---
A lot has been going on, with more than 530 patches and 70 PRs merged since
0.7.0 last summer. In summary:
- Quite a lot of syntax improvements and changes. Checkout the latest
[cheat-sheet](https://catalalang.github.io/catala/syntax.pdf) for an overview
- Allow local `let ... equals ... in ...` definitions
- Better error messages and positions throughout
- Added the ability to directly call a scope and retrieve its outputs, like a
function
- Added disambiguation, allowing to access structure fields without specifying
the structure type each time
- Added automated resolution of operators, allowing e.g. to write just `+` in
place of all the type-specific operators `+.`, `+$`, `+@`, `+^`, etc.
- More consistent priority for operators. It is no longer allowed to write `a
and b or c` without parenthesis.
- Added and changed some operators (`date + duration` now allowed either way,
`int / int` now returns a decimal, added `duration / duration`)
- Added the ability to have variables and functions defined at
top-level (outside of any scope). See annex A of the tutorial for details.
- Added support for functions with multiple arguments
- Some big refactors in the compiler, allowing much better code sharing between
the different passes, and making it much easier to extend. Also added the
possibility to run the type-checker earlier, etc.
- Countless bug-fixes
- Improvements to our proof backend with Z3
- A tool to automatically synchronise with the upstream French law from
Legifrance
2023-03-08 15:27:16 +03:00
|
|
|
version = "0.8.0"; # TODO parse `catala.opam` with opam2json
|
2021-10-29 15:45:05 +03:00
|
|
|
|
2021-12-01 17:53:17 +03:00
|
|
|
minimumOCamlVersion = "4.11";
|
2021-10-29 15:45:05 +03:00
|
|
|
|
2022-05-31 17:59:09 +03:00
|
|
|
src = ../.;
|
2021-10-29 15:45:05 +03:00
|
|
|
|
2022-09-05 13:47:52 +03:00
|
|
|
duneVersion = "3";
|
2021-10-29 15:45:05 +03:00
|
|
|
|
2023-02-24 16:32:37 +03:00
|
|
|
nativeBuildInputs = [ cppo menhir ];
|
|
|
|
|
2021-10-29 15:45:05 +03:00
|
|
|
propagatedBuildInputs = [
|
2022-08-03 18:02:13 +03:00
|
|
|
alcotest
|
2021-10-29 15:45:05 +03:00
|
|
|
ansiterminal
|
|
|
|
benchmark
|
2022-08-03 18:02:13 +03:00
|
|
|
bindlib
|
2022-12-12 13:55:22 +03:00
|
|
|
cmdliner
|
2022-09-05 16:05:52 +03:00
|
|
|
dates_calc
|
2022-08-03 18:02:13 +03:00
|
|
|
js_of_ocaml
|
|
|
|
js_of_ocaml-ppx
|
|
|
|
menhirLib
|
|
|
|
ocamlgraph
|
2022-01-10 18:25:32 +03:00
|
|
|
pkgs.z3
|
2021-12-16 21:16:57 +03:00
|
|
|
ppx_deriving
|
2022-08-03 18:02:13 +03:00
|
|
|
ppx_yojson_conv
|
|
|
|
re
|
|
|
|
sedlex
|
|
|
|
ubase
|
2021-10-29 15:45:05 +03:00
|
|
|
unionfind
|
2022-08-03 18:02:13 +03:00
|
|
|
visitors
|
|
|
|
z3
|
|
|
|
zarith
|
|
|
|
zarith_stubs_js
|
2023-02-24 16:32:37 +03:00
|
|
|
];
|
|
|
|
|
|
|
|
# Currently there is no unit tests in catala and Cram tests are handled by clerk
|
|
|
|
doCheck = false;
|
2021-10-29 15:45:05 +03:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://catala-lang.org";
|
|
|
|
description =
|
|
|
|
"Catala is a domain-specific programming language designed for deriving correct-by-construction implementations from legislative texts.";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
2022-02-04 17:35:52 +03:00
|
|
|
}
|