static void upgradeModuleVar(fS moduleVar, fS programID, final bool callMain) { S name = snippetWithTitle(programID); infoBox("Upgrading module " + name); O module = get(mc(), moduleVar); cleanUp(module); set(mc(), moduleVar, null); module = hotwire(programID); if (callMain) callMain(module); set(mc(), moduleVar, module); infoBox("Upgraded module " + name); }