Commit Graph

6 Commits

Author SHA1 Message Date
vbot
26875d24ad
Ast: add binders positions to EAbs 2024-10-28 17:45:18 +01:00
Louis Gesbert
35c862f906 Cleanup a bit the generation of the HandleExceptions operator
this behaviour in part duplicates the work of `-O`, but it's lighter-weight, and
it's often more convenient to debug code without `-O` (which still has impact on
traces generation) ; and this removes one or two levels of obfuscation when you
read the intermediate code.
2024-08-29 10:55:12 +02:00
Louis Gesbert
293bcd3817 Replace HandleDefault* internal operators by HandleExceptions
HandleExceptions only takes an array of exceptions, and returns Some if only one
of them is Some, None if they are all None, or raises a conflict error
otherwise.

The compilation of default terms then wraps this in a match (for the result of
HandleExceptions), and an if-then-else (for the justification-consequence in the
None case).

This avoids the complexity of having to handle thunked functions as arguments.
2024-07-04 15:08:13 +02:00
Louis Gesbert
583e80993a Remove the with-exceptions backend
*Disclaimer*: This is intended for discussion

My impression is that the with-exceptions backend is to be superseded by the
without-exception backend, which is more general and more efficient. Therefore,
seeing the added complexity of maintaining the two in parallel, I see no good
reason to keep the with-exceptions version now that the equivalence of their
semantics have been proved.

It will also be nice to reduce divergences between the different backends ; and
this should make further simplifications possible (e.g. some thunkings may no
longer be needed)

Of course I am ready to hear arguments in favor of keeping it, be it in the mid-
or long-term.

This patch removes the `--avoid-exceptions` flag, making it the only option, and
the corresponding `with_exceptions` variant of the dcalc->lcalc translation. It
doesn't do further simplifications.
2024-07-04 15:08:13 +02:00
Louis Gesbert
a2efc94fd2 Register the option type in ctx when used in lcalc 2023-12-19 17:30:28 +01:00
Louis Gesbert
47799ea24f Uniform naming of conversion modules across compilation passes 2022-11-22 12:08:18 +01:00