mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
Improve module error messages
This commit is contained in:
parent
e75ea3da07
commit
ff60aee5ef
@ -172,8 +172,8 @@ let rec disambiguate_constructor
|
||||
let modname = ModuleName.of_string modname in
|
||||
match ModuleName.Map.find_opt modname ctxt.modules with
|
||||
| None ->
|
||||
Message.raise_spanned_error mpos "Module %a not found" ModuleName.format
|
||||
modname
|
||||
Message.raise_spanned_error mpos "Module \"%a\" not found"
|
||||
ModuleName.format modname
|
||||
| Some ctxt ->
|
||||
let constructor =
|
||||
List.map (Mark.map (fun (_, c) -> path, c)) constructor0
|
||||
@ -419,7 +419,7 @@ let rec translate_expr
|
||||
let modname = ModuleName.of_string modname in
|
||||
match ModuleName.Map.find_opt modname ctxt.modules with
|
||||
| None ->
|
||||
Message.raise_spanned_error mpos "Module %a not found"
|
||||
Message.raise_spanned_error mpos "Module \"%a\" not found"
|
||||
ModuleName.format modname
|
||||
| Some ctxt -> get_str ctxt path)
|
||||
in
|
||||
|
@ -258,8 +258,8 @@ let rec module_ctx ctxt path =
|
||||
let modname = ModuleName.of_string modname in
|
||||
match ModuleName.Map.find_opt modname ctxt.modules with
|
||||
| None ->
|
||||
Message.raise_spanned_error mpos "Module %a not found" ModuleName.format
|
||||
modname
|
||||
Message.raise_spanned_error mpos "Module \"%a\" not found"
|
||||
ModuleName.format modname
|
||||
| Some ctxt -> module_ctx ctxt path)
|
||||
|
||||
(** {1 Declarations pass} *)
|
||||
|
Loading…
Reference in New Issue
Block a user