diff options
author | Escherichia | 2024-03-29 13:50:28 +0100 |
---|---|---|
committer | Escherichia | 2024-03-29 13:50:28 +0100 |
commit | 521c7380de5f11bfb190bdccd933ab6c1d0d6ca5 (patch) | |
tree | 5b26cf54ee9994a6dcdf8233c04977ee50861feb | |
parent | 786c54c01ea98580374638c0ed92d19dfae19b1f (diff) |
added file and line arg to craise, cassert and all related functions
-rw-r--r-- | compiler/ExtractBase.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/ExtractBase.ml b/compiler/ExtractBase.ml index eb37a726..8809d0c3 100644 --- a/compiler/ExtractBase.ml +++ b/compiler/ExtractBase.ml @@ -254,7 +254,7 @@ let empty_names_map : names_map = (** Small helper to report name collision *) let report_name_collision (id_to_string : id -> string) - ((id1, meta) : id * Meta.meta option) (id2 : id) (name : string) : unit = + (id1 : id) (id2 : id) (name : string) : unit = let id1 = "\n- " ^ id_to_string id1 in let id2 = "\n- " ^ id_to_string id2 in let err = @@ -263,10 +263,10 @@ let report_name_collision (id_to_string : id -> string) ^ "\nYou may want to rename some of your definitions, or report an issue." in (* If we fail hard on errors, raise an exception *) - save_error meta err + save_error __FILE__ __LINE__ None err let names_map_get_id_from_name (name : string) (nm : names_map) : - (id * meta option) option = + id option = StringMap.find_opt name nm.name_to_id let names_map_check_collision (id_to_string : id -> string) (id : id) |