let quit () = if !loops <> [] then Main.quit (List.hd !loops)