catala/compiler/shared_ast
Louis Gesbert bcde10242f Specialise the Map.Not_found exception raised by Map.find
... and add a custom printer

Since this is a very common bug, this patch should gain us a lot of time when
debugging uncaught Not_found errors, because the element not found can now be
printed straight away without the need for further debugging.

The small cost is that one should remember to catch the correct specialised
`Foo.Map.Not_found _` exception rather than the standard `Not_found` (which
would type-check but not catch the exception). Using `find_opt` should be
preferred anyway.

Note that the other functions from the module `Map` that raise `Not_found` are
not affected ; these functions are `choose`, `min/max_binding`,
`find_first/last` which either take a predicate or fail on the empty map, so it
wouldn't make sense for them (and we probably don't use them much).
2023-08-31 17:55:36 +02:00
..
definitions.ml Implement module lookups for scopes, structs, and enums 2023-08-31 17:54:39 +02:00
dune Fix most doc errors 2023-06-02 17:17:45 +02:00
expr.ml Specialise the Map.Not_found exception raised by Map.find 2023-08-31 17:55:36 +02:00
expr.mli Implement module lookups for scopes, structs, and enums 2023-08-31 17:54:39 +02:00
interpreter.ml Specialise the Map.Not_found exception raised by Map.find 2023-08-31 17:55:36 +02:00
interpreter.mli Refacter the main Driver module 2023-07-03 16:42:54 +02:00
operator.ml Merge branch 'master' into closure_conversion 2023-06-15 17:56:41 +02:00
operator.mli Fix most doc errors 2023-06-02 17:17:45 +02:00
optimizations.ml Implement module lookups for scopes, structs, and enums 2023-08-31 17:54:39 +02:00
optimizations.mli Improve integration of marks into the main AST 2023-05-17 17:37:00 +02:00
print.ml Implement module lookups for scopes, structs, and enums 2023-08-31 17:54:39 +02:00
print.mli Implement module lookups for scopes, structs, and enums 2023-08-31 17:54:39 +02:00
program.ml Implement module lookups for scopes, structs, and enums 2023-08-31 17:54:39 +02:00
program.mli Implement module lookups for scopes, structs, and enums 2023-08-31 17:54:39 +02:00
qident.ml Add some helper functions in a wrapper Map module 2023-07-12 11:51:15 +02:00
qident.mli Some commented code cleanup and clarifications 2023-06-19 16:36:09 +02:00
scope.ml Improve integration of marks into the main AST 2023-05-17 17:37:00 +02:00
scope.mli Implement module lookups for scopes, structs, and enums 2023-08-31 17:54:39 +02:00
shared_ast.ml Wip support for modules 2023-06-15 17:56:57 +02:00
shared_ast.mld Fix most doc errors 2023-06-02 17:17:45 +02:00
type.ml Adding typing for closure env 2023-06-15 11:11:56 +02:00
type.mli - [x] shared_ast 2023-02-20 15:57:42 +01:00
typing.ml Specialise the Map.Not_found exception raised by Map.find 2023-08-31 17:55:36 +02:00
typing.mli Implement module lookups for scopes, structs, and enums 2023-08-31 17:54:39 +02:00
var.ml Specialise the Map.Not_found exception raised by Map.find 2023-08-31 17:55:36 +02:00
var.mli Specialise the Map.Not_found exception raised by Map.find 2023-08-31 17:55:36 +02:00