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