Skip to content
Snippets Groups Projects
Commit f3ae1e7b authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[lib] renamed global hooks in messages

parent 2a3b1974
No related branches found
No related tags found
No related merge requests found
...@@ -48,11 +48,11 @@ module Messages = ...@@ -48,11 +48,11 @@ module Messages =
end) end)
let () = Ast.add_monotonic_state Messages.self let () = Ast.add_monotonic_state Messages.self
let demons = ref [] let hooks = ref []
let add_message m = let add_message m =
begin begin
Messages.set (m :: Messages.get ()) ; Messages.set (m :: Messages.get ()) ;
List.iter (fun fn -> fn()) !demons ; List.iter (fun fn -> fn()) !hooks ;
end end
let nb_errors () = let nb_errors () =
...@@ -100,7 +100,7 @@ let () = Log.check_not_yet := check_not_yet ...@@ -100,7 +100,7 @@ let () = Log.check_not_yet := check_not_yet
let reset_once_flag () = OnceTable.clear () let reset_once_flag () = OnceTable.clear ()
let add_global_hook fn = demons := !demons @ [fn] let add_global_hook fn = hooks := !hooks @ [fn]
(* (*
Local Variables: Local Variables:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment