let
attach_global g =
assert
(!attach_detach_mode);
globals := g :: !globals