Commit Graph

70 Commits

Author SHA1 Message Date
Louis Gesbert
404dc00db1 Alcotest is not a test dependency and needs stubs
This fixes the dependency, and the static linking scripts
2023-05-02 11:49:09 +02:00
Denis Merigoux
ba44949bea
Pin js_of_ocaml version : see https://github.com/CatalaLang/catala/issues/442 2023-04-04 17:13:00 +02:00
Louis Gesbert
508992de33 Embed the Pygments Catala lexer
This enables the HTML output to work without a custom Pygments installation (or
the proper venv activated)
2023-03-13 14:41:24 +01:00
Louis Gesbert
deb12d2c4a 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 18:07:53 +01:00
Louis Gesbert
517efac836 Add explicit uutf dependency
(ubase no longer depends on it, but we use it directly)
2023-01-04 17:55:39 +01:00
Louis Gesbert
59f81b4002 Rework and update the cheat-sheet
and pygments syntax coloring
2022-12-19 16:05:02 +01:00
Denis Merigoux
2d26040a7a
Obelisk already in dev mode 2022-09-05 14:12:23 +02:00
Raphaël Monat
973c346328 Add support for is_leap_year in z3 backend and runtime 2022-09-05 09:28:58 +02:00
Raphaël Monat
f337cebc4b Fix missing dependency for dune build 2022-08-30 15:06:53 +02:00
Denis Merigoux
e5aed3efcb
Merge branch 'master' into rmonat_dates_calc_lib 2022-08-19 14:59:46 +02:00
Raphaël Monat
0b73fbbac4 Add support for first and last day of month operators 2022-08-18 21:22:50 +02:00
Denis Merigoux
aee08d5d10
Revert "Remove constraing because https://github.com/ocaml/opam-repository/pull/21795 has been merged"
This reverts commit bb27840d79.
2022-08-10 11:33:22 +02:00
Denis Merigoux
bb27840d79
Remove constraing because https://github.com/ocaml/opam-repository/pull/21795 has been merged 2022-08-09 15:32:43 +02:00
Denis Merigoux
922d3af7dc
Bump dependency of js_of_ocaml 2022-08-09 12:39:26 +02:00
Denis Merigoux
03e598128a
Bumping version number 2022-08-08 17:26:07 +02:00
Raphaël Monat
ffd2e1dec3 Merge branch 'master' into dates_calc_lib 2022-08-06 17:26:55 +02:00
Raphaël Monat
4f12338d49 Switch from calendarlib to in-house dates_calc 2022-08-06 17:07:01 +02:00
Emile Rolley
d85812109c refactor(compiler): remove the camomile dependency due to the new Utils.String_common module based on Ubase 2022-08-05 10:55:45 +02:00
Emile Rolley
03aebf7f1c feat(backends/html): improve the code generation with ToC and details tags 2022-08-05 10:55:45 +02:00
Louis Gesbert
0bd80c7c22 Update INSTALL.md instructions 2022-07-20 12:05:19 +02:00
Louis Gesbert
39139816ff Use groff directly instead of man2html 2022-07-20 12:05:19 +02:00
Louis Gesbert
dfccf8e139 Run all CI tests through a Docker container
Also reworks some dependency handling
2022-07-20 12:05:17 +02:00
Louis Gesbert
985ecdac6d Bump required OCaml version to 4.13
This version of OCaml introduces [let-punning](https://v2.ocaml.org/manual/bindingops.html#ss:letops-punning)

It is just syntactic sugar, but OCamlformat makes use of it, without a configuration option, when the OCaml version permits.
This means that the same version of OCamlformat gives different results depending on the underlying OCaml version. Our options, if we want to keep the forced-format policy on the repository, are therefore:
- to disable it whenever binding operators are used (with this PR that's a lot of places, and this becomes too cumbersome, besides defeating the purpose)
- to force devs to use an earlier version of OCaml so that reformatting outputs something compatible
- to bump the minimum OCaml requirement

The latter is the simplest, but it can be reviewed if compatibility is required. Last option would be to report the issue to OCamlformat and hope that they provide a workaround...
2022-07-11 17:42:34 +02:00
Emile Rolley
92ebb4194b refactor(api_web/runtime): runtime_value derive yojson_of 2022-05-25 14:26:58 +02:00
Louis Gesbert
6837af4e80 Upgrade Cmdliner dep 2022-05-09 11:39:18 +02:00
Louis Gesbert
971dd82691 Disable dune generated opam files
They avoid a bit of duplication, but don't support depexts and having to
commit the generated opam files means that, often, the wrong file is
fixed.
2022-05-09 11:34:15 +02:00
Denis Merigoux
20996a10be
Cleaning 2022-03-09 17:06:25 +01:00
Louis Gesbert
9456ace6b1 Make z3 an optional dependency, add 'make dependencies-noz3'
Also the CI will no longer compile/use z3
2022-03-09 12:53:17 +01:00
Denis Merigoux
e5e0164fee
Remove unused dev dependencies in opam file
As suggested by https://github.com/ocaml/opam-repository/pull/20861#issuecomment-1061807613
2022-03-08 17:25:25 +01:00
Denis Merigoux
65a5a42c16
Change settings 2022-03-08 15:01:18 +01:00
Denis Merigoux
c5d63148f8
Fix dune build -p catala @runtest 2022-03-08 11:28:42 +01:00
Denis Merigoux
2d63a08f23
Removed extra newlines 2022-03-07 19:41:27 +01:00
Denis Merigoux
8fb681baa1
Bump version to 0.6.0
Changelog:
* Catala as a proof platform (Z3 backend, safety checks)
* More expressivity for exceptions
* Multiple states for one variable
* Build system relying on ninja-build
* Better debug printers
* Alternative compilation mode without try ... with exceptions
2022-03-07 19:35:56 +01:00
Emile Rolley
f277f272d1 test(clerk): setup alcotest + two first tests 2022-02-25 20:30:05 +01:00
Emile Rolley
73576548c6 docs: update authors fields 2022-02-25 16:49:22 +01:00
Emile Rolley
3a6450b42f Merge branch 'master' into refactor-clerk-w-ninja 2022-02-25 12:31:16 +01:00
Emile Rolley
79c39889bd fix(opam): try to add ninja_utils as a standalone package 2022-02-24 14:05:37 +01:00
Alain
73fe2f876c Revert "Merge pull request #196 from CatalaLang/fixup-cmdliner"
fix cmdliner to 1.0.4

This reverts commit 8e1a1ccb63, reversing
changes made to 4812830a25.
2022-02-21 14:53:48 +01:00
Denis Merigoux
1cec4b0721
Pretty-printer for scalc 2022-02-14 18:22:26 +01:00
Louis Gesbert
75bcbca706 Add z3 dependency
Just to check how well the caching works
2022-01-13 12:38:16 +01:00
Denis Merigoux
e2981c4ffc
Pin ocamlformat version 2022-01-13 12:20:53 +01:00
Louis Gesbert
0e1500f8f0 An attempt to simplify deps install and CI
from the docs, the setup-ocaml@v2 github action should already handle caching...
2022-01-13 12:15:39 +01:00
Denis Merigoux
22cd03c466
Bumping version numbers and fixing 0.5.0 build 2021-11-07 11:00:46 +01:00
Denis Merigoux
485d093b7e
Bump Catala version number 2021-11-07 01:38:17 +01:00
Denis Merigoux
cf31da7ca1
Remove limitation on Zarith since https://github.com/janestreet/zarith_stubs_js/pull/8 is closed 2021-10-18 09:58:47 +02:00
Denis Merigoux
577bfe67a5
Added dependencies at other places 2021-08-23 14:24:39 +02:00
Louis Gesbert
98aed4187a Further factorise decimals parsing 2021-08-19 20:32:23 +02:00
Denis Merigoux
7446b1fe57
Reorganized public libraries 2021-04-22 17:57:27 +02:00
Denis Merigoux
7d05ee5d2a Cleaned dune project and opam files 2021-04-06 21:43:10 +02:00
Denis Merigoux
c2eaf08daa Fixed missing stub in JS output 2021-04-02 17:57:44 +02:00