Louis Gesbert
67179a793c
Add type annotations on all AST nodes (first pass)
2022-07-11 16:51:54 +02:00
Louis Gesbert
513647cd32
AST simplification: remove redundant annotations
...
The AST structures track annotations (e.g., at the moment, source code
position information) in a lot of places. This patch tidies up a bit and
removes some duplication, ensuring a single level of annotation wrapping
at each AST recursion level.
This will be important when adding type information in these
annotations, because there will be consitency constraints to be ensured
and duplication is a likely source of mistakes.
2022-07-11 16:51:54 +02:00
Louis Gesbert
af0ac95682
Propagate renaming of Pos.mark*
into module Marked
...
this patch is just a bunch of `sed` commands
```shell
cd compiler
sed -i 's/Pos.marked/Marked.pos/g' *.ml* **/*.ml*
sed -i 's/Pos.unmark/Marked.unmark/g' *.ml* **/*.ml*
sed -i 's/Pos\.get_position/Marked.get_mark/g' *.ml* **/*.ml*
sed -i 's/Pos\.same_pos_as/Marked.same_mark_as/g' *.ml* **/*.ml*
sed -i 's/Pos\.map_under_mark/Marked.map_under_mark/g' *.ml* **/*.ml*
sed -i 's/Pos\.mark/Marked.mark/g' *.ml* **/*.ml*
sed -i 's/Pos\.compare_marked/Marked.compare/g' *.ml* **/*.ml*
```
2022-07-11 16:51:54 +02:00
Denis Merigoux
8ce81fedaa
Start to refactor Lcalc AST (WIP) [skip ci]
2022-04-15 12:16:44 +02:00
Denis Merigoux
8be3d1cfc9
Made more functions generic in Dcalc.Ast
2022-04-12 17:54:00 +02:00
Denis Merigoux
c7c774a1a1
Closure conversion: case of EAbs implemented
2022-03-31 12:19:31 +02:00
Denis Merigoux
a660987df0
Starting to implement closure conversion [skip ci]
2022-03-21 17:26:23 +01:00
Denis Merigoux
5bd66142a6
Big reformatting
...
ocamlformat 0.19.0 -> 0.20.1
100 -> 80 columns per line
Reestablished @emilerolley's smart fun break
2022-03-08 15:03:14 +01:00
Alain
7e1057c541
review of lcalc
2022-02-18 15:47:54 +01:00
Denis Merigoux
cab4e5c17e
Merge branch 'master' into alain_default-option
2022-02-15 10:20:53 +01:00
Denis Merigoux
b25f64c3ae
Improve printing
2022-02-14 17:01:34 +01:00
Denis Merigoux
a06dfbfaa5
Assets and formatting
2022-02-04 15:29:31 +01:00
Alain
6ad948ed76
more cleanup in lcalc-ast
2022-02-04 15:13:28 +01:00
Alain
6da5cc518b
cleanup dcalc-ast.ml
2022-02-04 12:33:26 +01:00
Alain
f8343d1d0c
cleanup lcalc-ast.ml
2022-02-04 12:28:03 +01:00
Alain
d7c422d33c
clarify make_matchopt + lcalc's ast ocamlformat
2022-02-02 12:23:52 +01:00
Alain
fcf6fecf71
implementation of a few cases in the translation without exceptions
2022-01-28 11:07:29 +01:00
Alain
1bfb891aa1
printing dcalc and lcalc ast
2022-01-25 13:55:17 +01:00
Alain
df545e5761
add translate_binder
...
refactor make_bindopt
refactor make_matchopt
added make_bindmopt
remove _{i}_ printing in to_ocaml
add correct printing of handle_default_opt
add two-step translation
correct context for new variables
2021-12-07 18:57:28 +01:00
Alain
177a2149ac
handle_opt
2021-12-07 16:03:15 +01:00
Alain
76f5e6115c
changing signature -- cont
2021-11-30 18:05:30 +01:00
Denis Merigoux
536dde9834
Formatting + CI + etc
2021-11-30 16:27:47 +01:00
Alain
8d580f1db6
fix: removed ESome and ENone constructions.
2021-11-29 17:53:07 +01:00
Alain
22af2a9335
refactored transformation to remove matchopt construction
2021-11-29 17:40:30 +01:00
Alain
c2db3a40c6
ref: use of built-in match instead of matchopt (wip)
2021-11-26 17:10:31 +01:00
Alain
fcdaa21d54
add utilities that replace to deal with options
2021-11-25 17:27:06 +01:00
Denis Merigoux
fb281a0d99
Formatting
2021-11-24 15:22:29 +01:00
Alain
0f5fde2c5a
advancing
2021-11-22 15:55:21 +01:00
Alain
41a8961285
tentative, trying something else
2021-11-22 15:55:21 +01:00
Alain
6fdd739f54
saving my work somewhere
2021-11-22 15:55:21 +01:00
Denis Merigoux
eb9c75f394
Making progress into translation
2021-06-23 17:47:34 +02:00
Denis Merigoux
bbd50747d9
Big renaming and dir reorg
2021-06-21 11:39:06 +02:00