1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
open Plugin let register = ref [] let current_file = ref "" let register_plugin plugin = register := (!current_file, plugin) :: !register module RegisterPlugin(P:PLUGIN) = struct let handle = (module P : PLUGIN) let () = register_plugin handle end