Siggy Scott
20aa04eb96
Tweak tutorial language in response to #273 .
2023-06-23 08:33:47 -04:00
Denis Merigoux
8d602d6bd2
Fix FR vscode syntax highlighting
2023-06-22 13:21:08 +02:00
Denis Merigoux
3329a1b48b
Implementing closure conversion ( #475 )
2023-06-22 12:30:54 +02:00
Denis Merigoux
5f48e5dac1
Merge branch 'master' into closure_conversion
2023-06-20 11:02:13 +02:00
Denis Merigoux
615ad54f08
Remove unmaintained examples ( fix #468 ) ( #480 )
2023-06-20 10:25:43 +02:00
Louis Gesbert
f31a78593e
Preliminary support for modules/externals + CLI subcommands ( #478 )
2023-06-20 09:31:45 +02:00
Louis Gesbert
3ca1a34122
Update and fix Dockerfile
2023-06-19 21:38:40 +02:00
Denis Merigoux
9007eb4204
Apply suggestions by @altgr
2023-06-19 17:29:51 +02:00
Louis Gesbert
237dca2e75
Some commented code cleanup and clarifications
2023-06-19 16:36:09 +02:00
Denis Merigoux
71ead0c6fa
Remove all mentions
2023-06-19 12:01:06 +02:00
Denis Merigoux
0ca42cbcf9
Fix headings
2023-06-19 11:37:58 +02:00
Denis Merigoux
147e70feed
Remove unmaintained examples ( fix #468 )
2023-06-19 11:21:00 +02:00
Denis Merigoux
10cd3b0fc8
Update assets
2023-06-18 21:45:09 +02:00
Denis Merigoux
420348beda
Added a last TODO and put big example under CI
2023-06-18 21:38:00 +02:00
Denis Merigoux
b55d8c823b
Closure conversion & hoisting working
2023-06-18 21:30:55 +02:00
Louis Gesbert
691d81ba72
Makefiles: fix catala arguments order
...
the command name now needs to be first
2023-06-18 18:35:39 +02:00
Louis Gesbert
0c6ae736cb
Forbid "base 0.16"
...
There is trouble with CI because it needs bash, and apparently the upgrade also
leads to conflicts between yojson and its ppx (which is where the dependecy upon
base lies)
2023-06-18 18:35:39 +02:00
Denis Merigoux
2ddbe93126
Bug identified
2023-06-18 18:15:29 +02:00
Denis Merigoux
a20adc0055
Closure hoisting (missing a bug on hardest case)
2023-06-18 18:08:18 +02:00
Denis Merigoux
2c45ca1599
More doc
2023-06-18 16:08:16 +02:00
Denis Merigoux
9cf55b0edd
Closure env is unit if no extra variable captured
2023-06-18 15:49:02 +02:00
Louis Gesbert
52b1c25d50
Refactor CLI to use sub-commands
...
The upside of this is that each command can define specific flags ; there is a
small loss of backwards-compatibility in that the command needs to be the first
argument.
`catala --help` will now only show a summary of commands, with more specific
manpages shown on `catala CMD --help`.
Another point is that the plugin interface is extended to allow plugins to be
registered as subcommands and have their own flags (this will be very useful for
adding flags to the lazy/dot/explanation plugin that has many options).
Note that no efforts has yet been made to specialise the options, the previous
type was just made global for all subcommands.
2023-06-15 18:00:10 +02:00
Louis Gesbert
da59076223
Add a command-line option ('--use') for module linking
2023-06-15 17:58:46 +02:00
Louis Gesbert
ec97c386c3
Reformat + regen
2023-06-15 17:57:01 +02:00
Louis Gesbert
26c75af2ae
Allow declaration of toplevel values without definition
2023-06-15 17:57:01 +02:00
Louis Gesbert
e224e87f71
Wip support for modules
...
(first working dynload test with compilation done by manual calls to ocaml)
A few pieces of the puzzle:
* Loading of interfaces only from Catala files
* Registration of toplevel values in modules compiled to OCaml, to allow access
using dynlink
* Shady conversion from OCaml runtime values to/from Catala expressions, to
allow interop (ffi) of compiled modules and the interpreter
2023-06-15 17:56:57 +02:00
Denis Merigoux
6962761774
Merge branch 'master' into closure_conversion
2023-06-15 17:56:41 +02:00
Louis Gesbert
2f2614c508
Use the AST mapper for scopelang-> dcalc
2023-06-15 17:55:52 +02:00
Louis Gesbert
2b7beeefb2
Rename 'IdentName' to 'Ident'
2023-06-15 17:55:49 +02:00
Denis Merigoux
3d3e735402
Nicer error message
2023-06-15 17:47:58 +02:00
Denis Merigoux
ed2891c761
Closure conversion should work now
2023-06-15 17:32:00 +02:00
Denis Merigoux
d850ac688a
Added operators for closure environment handling
2023-06-15 16:52:36 +02:00
Denis Merigoux
57abfbf2c7
Other pattern matching
2023-06-15 16:33:14 +02:00
Denis Merigoux
c4675e18a7
Messages renamed to Message (lighter syntax) ( #476 )
2023-06-15 11:39:23 +02:00
Denis Merigoux
a3087ee163
Adding typing for closure env
2023-06-15 11:11:56 +02:00
Denis Merigoux
385e19b9e1
Formatting
2023-06-15 10:51:31 +02:00
Denis Merigoux
571c7c5d89
Correctly count number of var occurences
2023-06-14 11:39:27 +02:00
Denis Merigoux
42aaa1017d
Created minimal not working example and tame down beta-reduction
2023-06-14 11:18:39 +02:00
Denis Merigoux
2c9b56fb70
More agressive re-typing
2023-06-13 20:37:23 +02:00
Denis Merigoux
27bbe78438
Understanding a limitation
2023-06-13 20:10:42 +02:00
Aminata-Dev
10d147a8b1
Messages renamed to Message (lighter syntax)
2023-06-13 11:50:56 +02:00
Denis Merigoux
7072369b2d
Starting to work
2023-06-13 11:43:13 +02:00
Denis Merigoux
926c9436e3
Fix some bugs
2023-06-13 11:15:32 +02:00
Denis Merigoux
0e99d1598b
Continue closure conversion
2023-06-13 10:49:46 +02:00
Denis Merigoux
30eb3c0bdb
Better printing for types in typing error message
2023-06-13 09:55:48 +02:00
Denis Merigoux
84350b1593
Better typing error message
2023-06-13 09:07:42 +02:00
Denis Merigoux
26d53cc87f
Rainbow parenthesis for types
2023-06-13 08:59:33 +02:00
Aminata-Dev
5f9cb55e34
s
2023-06-12 17:00:10 +02:00
Denis Merigoux
45375dd7b5
Fix a bug in closure conversion
2023-06-12 15:21:06 +02:00
Denis Merigoux
cdae3e43ac
Improve names of temp variable in monadic pass
2023-06-12 15:02:08 +02:00