Commit Graph

3357 Commits

Author SHA1 Message Date
Denis Merigoux
38081245b8
Really fix #466 2023-05-23 16:39:21 +02:00
Denis Merigoux
a00501fffa
Fix typo causing bad parsing 2023-05-23 15:39:41 +02:00
Denis Merigoux
e092679b75
Fixing #466 by reversing exception precedence 2023-05-23 14:12:26 +02:00
Denis Merigoux
5e6bf897a6
Improve AST markings (#467) 2023-05-23 11:11:14 +02:00
Louis Gesbert
209be6b758 Improve integration of marks into the main AST
Two interdependent changes here:
1. Enforce all instances of Shared_ast.gexpr to use the generic type for marks.
   This makes the interfaces a tad simpler to manipulate: you now write
   `('a, 'm) gexpr` rather than `('a, 'm mark) gexpr`.
2. Define a polymorphic `Custom` mark case for use by pass-specific annotations.
   And leverage this in the typing module
2023-05-17 17:37:00 +02:00
Louis Gesbert
fc531777c0 Rework and normalise the Marked interface
The module is renamed to `Mark`, and functions renamed to avoid redundancy:

`Marked.mark` is now `Mark.add`
`Marked.unmark` is now `Mark.remove`
`Marked.map_under_mark` is now simply `Mark.map`
etc.

`Marked.same_mark_as` is replaced by `Mark.copy`, but with the arguments
swapped (which seemed more convenient throughout)

Since a type `Mark.t` would indicate a mark, and to avoid confusion, the type
`Marked.t` is renamed to `Mark.ed` as a shorthand for `Mark.marked` ; this part
can easily be removed if that's too much quirkiness.
2023-05-17 17:37:00 +02:00
Louis Gesbert
558fcb6fef Build: remove unnecessary ppx on dcalc, lcalc
we only use `visitors` for positions on the surface AST
2023-05-17 14:08:32 +02:00
Louis Gesbert
ba52aae401 Cleanup: definitions.ml is not for values
A module without mli is ok as long as it only contains types

Here we already stretch it a bit with some functor applications, but having
toplevel values defeats the expectation that you can safely `open` this module.
2023-05-17 13:26:47 +02:00
adelaett
da04faf02f Update lock files 2023-05-15 00:24:34 +00:00
Denis Merigoux
9354c29fe4
Tweak .gitattributes 2023-05-11 11:36:26 +02:00
adelaett
028e9459bf Update lock files 2023-05-08 00:23:44 +00:00
Emile Rolley
86121308fe publish(runtimes/rescript): @catala-lang/rescript-catala v0.8.0 2023-05-07 15:13:22 +02:00
Emile Rolley
fa8ebd3b62 docs: update the generating website assets section from the INSTALL file 2023-05-07 15:13:22 +02:00
Emile Rolley
4637260b1e publish(french_law/js): @catala-lang/french-law 0.8.0 2023-05-07 15:13:22 +02:00
Emile Rolley
4935dd1280 build(assets): do not copy french_law.js anymore (use the @catala-lang/french-law instead) 2023-05-07 15:13:22 +02:00
Emile Rolley
16eaf63004 publish(french_law/js): @catala-lang/french-law v0.5.2
+ generate src/french_law.js with `make all` instead of `make generate-website-assets`
2023-05-07 15:13:22 +02:00
Emile Rolley
64079f52e8 fix(french_law/js): move the dune file into src/ 2023-05-07 15:13:22 +02:00
Emile Rolley
6587f18331 publish(french_law/js): @catala-lang/french-law v0.5.1 2023-05-07 15:13:22 +02:00
Emile Rolley
1d9388a339 feat(french_law/js): add a ReScript wrapper for french_law.js 2023-05-07 15:13:22 +02:00
Emile Rolley
77b42d9e29 publish(runtimes/rescript): @catala-lang/rescript-catala v0.1.1 2023-05-07 15:13:22 +02:00
Emile Rolley
b4372a965d refactor(runtimes/rescript): rename Runtime into CatalaRuntime 2023-05-07 15:13:22 +02:00
Emile Rolley
2a39f1b5f8 feat(runtimes): add rescript-catala 2023-05-07 15:13:22 +02:00
Denis Merigoux
c5124f50c4
Overseas housing benefits : last fixes and tests (#446) 2023-05-05 09:47:41 +02:00
Denis Merigoux
5509239662
Update assets 2023-05-04 19:23:11 +02:00
Denis Merigoux
eae61256ef
Adhere to the GNU standard for error messages 2023-05-04 19:19:19 +02:00
Denis Merigoux
eec5ae54c6
Fixed formatting -> tests update 2023-05-04 19:18:53 +02:00
Denis Merigoux
a5d4f54115
Push some fixes suggested by @altgr 2023-05-04 18:28:24 +02:00
Denis Merigoux
bcd91f5dea
Merge branch 'master' into aides_logement_outre_mer 2023-05-04 11:04:28 +02:00
Louis Gesbert
2a43929d59
Some more fixes and improvements to the printer (#462) 2023-05-03 17:36:57 +02:00
Denis Merigoux
7b8c35057d
Update Docker instructions in INSTALL.md (#463) 2023-05-02 21:58:52 +02:00
Louis Gesbert
b1955bd9d4 Don't use a debug printing function for OCaml output 2023-05-02 16:48:01 +02:00
Louis Gesbert
5e26c5c83d Yet more printer improvements
- Fix the printer for scopes
- Improve the printer for struct types
- Remove `Print.expr'`. Use `Expr.format` as the function with simplified arguments instead.
2023-05-02 16:33:23 +02:00
Louis Gesbert
3294011d47 Update Docker instructions in INSTALL.md 2023-05-02 15:22:51 +02:00
Louis Gesbert
83e7a845fe Cleanup expr printer interface
- `Print.expr` no longer needs the context
- This removes the need for `expr ~debug` + `expr_debug` ;
  use `Print.expr` for normal (non-debug) output,
  and `Print.expr' ?debug ()` for possibly debug output.
- This improves consistency of debug expr output in many places
- Prints simplified operators (without type suffix) in non-verbose mode

(this patch also fixes some cases of `Expr.skip_wrappers` and leverages the
binder equality provided by Bindlib)
2023-05-02 13:32:16 +02:00
Louis Gesbert
c249cef3cc Printer: flatten nested let-ins too 2023-05-02 11:53:30 +02:00
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
Louis Gesbert
3e7a2a34ab More printer improvements 2023-05-02 11:49:09 +02:00
Louis Gesbert
cec52d47de Printer: flatten "else if" 2023-05-02 11:49:09 +02:00
Louis Gesbert
8a2b50289e Printer: add some missing boxes 2023-05-02 11:49:09 +02:00
Denis Merigoux
9c1b51b1a1
Fix(plugins/json_schema): don't translate the TUnit type into "null" anymore (#461) 2023-05-02 10:59:39 +02:00
Denis Merigoux
c6bafe8896
Update assets and tests 2023-05-02 10:58:45 +02:00
adelaett
ce5b76f85c Update lock files 2023-05-01 00:26:55 +00:00
Denis Merigoux
3bc5b188ea
french_law.js on git compiled with dev profile 2023-04-28 14:49:45 +02:00
Denis Merigoux
8d7666ee92
Interleave assertions with rules from desugared to scopelang 2023-04-28 14:15:43 +02:00
Emile Rolley
8128c47fa4 assets(french_law): udpate the french_law.js lib 2023-04-28 13:41:53 +02:00
Emile Rolley
def003af8d fix(plugins/json_schema): don't translate the TUnit type into "null" anymore 2023-04-28 13:41:25 +02:00
Denis Merigoux
d70886431d
Fix false positive found by proof mode with an assertion clearly stating the impossible situations 2023-04-28 10:39:19 +02:00
Denis Merigoux
e6bccd716d
Fix a Catala program bug thanks to Proof mode! 2023-04-27 18:03:27 +02:00
Denis Merigoux
a954942fd9
Bug in the law found with proof mode? 2023-04-27 16:58:40 +02:00
Denis Merigoux
7788bf9e73
Error message when two same states 2023-04-27 15:37:11 +02:00