@@ -12,7 +12,7 @@ Elm.debuggerInit = function(module) {
15−function debuggerInit(module, elm) {
15+function debuggerInit(module, runtime) {
17 var programPaused = false;
17 var programPaused = false;
18 var allNodes = null;
18 var allNodes = null;
@@ -32,7 +32,7 @@ function debuggerInit(module, elm) {
32 // ignore notify because we are stepping
32 // ignore notify because we are stepping
35− elm.notify(id, v, timestep);
35+ runtime.notify(id, v, timestep);
36 recordEvent(id, v, timestep);
36 recordEvent(id, v, timestep);
@@ -66,7 +66,7 @@ function debuggerInit(module, elm) {
69− function gotoStep(index) {
69+ function stepTo(index) {
70 if (!programPaused) {
70 if (!programPaused) {
71 programPaused = true;
71 programPaused = true;
72 resetProgram();
72 resetProgram();
@@ -84,7 +84,7 @@ function debuggerInit(module, elm) {
84 assert(index >= eventCounter, "index must be bad");
84 assert(index >= eventCounter, "index must be bad");
85 while (eventCounter < index) {
85 while (eventCounter < index) {
86 var nextEvent = recordedEvents[eventCounter];
86 var nextEvent = recordedEvents[eventCounter];
87− elm.notify(nextEvent.id, nextEvent.value, nextEvent.timestep);
87+ runtime.notify(nextEvent.id, nextEvent.value, nextEvent.timestep);
89 eventCounter += 1;
89 eventCounter += 1;
@@ -104,7 +104,7 @@ function debuggerInit(module, elm) {
104 function doPlayback(eventList) {
104 function doPlayback(eventList) {
105 var x = eventList.shift();
105 var x = eventList.shift();
106 var time = x[2];
106 var time = x[2];
107− elm.notify(x[0], x[1], x[2]);
107+ runtime.notify(x[0], x[1], x[2]);
109 if (eventList.length > 0) {
109 if (eventList.length > 0) {
110 var delta = eventList[0][2] - time;
110 var delta = eventList[0][2] - time;
@@ -117,17 +117,17 @@ function debuggerInit(module, elm) {
117 graphicsFoldp.recv(Date.now(), true, moduleRetValue.main.id);
117 graphicsFoldp.recv(Date.now(), true, moduleRetValue.main.id);
120− var wrappedElm = {
120+ var wrappedRuntime = {
121 notify: wrapNotify,
121 notify: wrapNotify,
122 runDelayed: wrapRunDelayed,
122 runDelayed: wrapRunDelayed,
123− node: elm.node,
123+ node: runtime.node,
124− display: elm.display,
124+ display: runtime.display,
125− id: elm.id,
125+ id: runtime.id,
126− addListener: elm.addListener,
126+ addListener: runtime.addListener,
127− inputs: elm.inputs
127+ inputs: runtime.inputs
130− var moduleRetValue = module.make(wrappedElm);
130+ var moduleRetValue = module.make(wrappedRuntime);
132 var elmDebugger = {
132 var elmDebugger = {
133 moduleRetValue: moduleRetValue,
133 moduleRetValue: moduleRetValue,
@@ -136,10 +136,10 @@ function debuggerInit(module, elm) {
136 reset: resetProgram,
136 reset: resetProgram,
137 restart: restartProgram,
137 restart: restartProgram,
138 getMaxSteps: getMaxSteps,
138 getMaxSteps: getMaxSteps,
139− stepTo: gotoStep
139+ stepTo: stepTo
142− allNodes = flattenNodes(wrappedElm.inputs);
142+ allNodes = flattenNodes(wrappedRuntime.inputs);
143 initialProgramState.nodeValues = saveNodeValues(allNodes);
143 initialProgramState.nodeValues = saveNodeValues(allNodes);
144 initialProgramState.asyncTimers = asyncTimers.slice();
144 initialProgramState.asyncTimers = asyncTimers.slice();