Skip to content

Commit e21f62f

Browse files
committed
Comment out jumping
1 parent 48dbdd4 commit e21f62f

File tree

23 files changed

+314
-311
lines changed

23 files changed

+314
-311
lines changed

src/haz3lcore/ProbePerform.re

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -592,11 +592,11 @@ let go =
592592
| Some(id) => toggle_statics(~syntax, id, info_map, z)
593593
| None => z
594594
}
595-
| StepInto(sample, ap_id) =>
596-
switch (step_into_sample(~syntax, ~sample, ~ap_id, info_map, z)) {
597-
| Some(z) => z
598-
| None => z
599-
}
595+
// | StepInto(sample, ap_id) =>
596+
// switch (step_into_sample(~syntax, ~sample, ~ap_id, info_map, z)) {
597+
// | Some(z) => z
598+
// | None => z
599+
// }
600600
};
601601

602602
/* Check if id has either manual or ephermeral probe on it */

src/haz3lcore/projectors/implementations/ProbeProj.re

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -526,9 +526,9 @@ let dropdown_id = (sample_id: int): string =>
526526
"sample-dropdown-" ++ string_of_int(sample_id);
527527

528528
/* Step into handler for sample context menu */
529-
let step_into_sample =
530-
(~parent, ~sample: Sample.t, ~ap_id: Id.t): Ui_effect.t(unit) =>
531-
parent(Probe(StepInto(sample, ap_id)));
529+
// let step_into_sample =
530+
// (~parent, ~sample: Sample.t, ~ap_id: Id.t): Ui_effect.t(unit) =>
531+
// parent(Probe(StepInto(sample, ap_id)));
532532

533533
/* Context actions for a sample (Pin/Unpin, Step Into, etc.) */
534534
let sample_context_actions =
@@ -557,26 +557,26 @@ let sample_context_actions =
557557
span(~attrs=[Attr.classes(["shortcut"])], [text("P")]),
558558
],
559559
),
560-
/* Step Into action */
561-
div(
562-
~attrs=[
563-
Attr.classes(["action-item", "step-into-action"]),
564-
Attr.on_pointerdown(_
565-
/* Stop propagation to prevent parent wrapper's Focus action
566-
from moving cursor back to the probe after we jump */
567-
=>
568-
Effect.Many([
569-
Effect.Stop_propagation,
570-
step_into_sample(~parent, ~sample, ~ap_id),
571-
])
572-
),
573-
],
574-
[
575-
div(~attrs=[Attr.classes(["step-into-icon"])], []),
576-
text("Step into"),
577-
span(~attrs=[Attr.classes(["shortcut"])], [text("Enter")]),
578-
],
579-
),
560+
// /* Step Into action */
561+
// div(
562+
// ~attrs=[
563+
// Attr.classes(["action-item", "step-into-action"]),
564+
// Attr.on_pointerdown(_
565+
// /* Stop propagation to prevent parent wrapper's Focus action
566+
// from moving cursor back to the probe after we jump */
567+
// =>
568+
// Effect.Many([
569+
// Effect.Stop_propagation,
570+
// step_into_sample(~parent, ~sample, ~ap_id),
571+
// ])
572+
// ),
573+
// ],
574+
// [
575+
// div(~attrs=[Attr.classes(["step-into-icon"])], []),
576+
// text("Step into"),
577+
// span(~attrs=[Attr.classes(["shortcut"])], [text("Enter")]),
578+
// ],
579+
// ),
580580
],
581581
),
582582
];
@@ -1011,19 +1011,19 @@ let key_handler =
10111011
print_endline("pin: no sample or ap_id");
10121012
Many([Stop_propagation, Prevent_default]);
10131013
}
1014-
| D("Enter") =>
1015-
/* Step into the indicated sample */
1016-
switch (indicated_sample(~ap_id, di), ap_id) {
1017-
| (Some(sample), Some(ap_id)) =>
1018-
Many([
1019-
Stop_propagation,
1020-
Prevent_default,
1021-
step_into_sample(~parent, ~sample, ~ap_id),
1022-
])
1023-
| _ =>
1024-
print_endline("step into: no sample or ap_id");
1025-
Many([Stop_propagation, Prevent_default]);
1026-
}
1014+
// | D("Enter") =>
1015+
// /* Step into the indicated sample */
1016+
// switch (indicated_sample(~ap_id, di), ap_id) {
1017+
// | (Some(sample), Some(ap_id)) =>
1018+
// Many([
1019+
// Stop_propagation,
1020+
// Prevent_default,
1021+
// step_into_sample(~parent, ~sample, ~ap_id),
1022+
// ])
1023+
// | _ =>
1024+
// print_endline("step into: no sample or ap_id");
1025+
// Many([Stop_propagation, Prevent_default]);
1026+
// }
10271027
| _ => Many([Stop_propagation])
10281028
};
10291029
};

src/haz3lcore/zipper/action/Action.re

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type chunkiness =
88
[@deriving (show({with_path: false}), sexp, yojson, eq)]
99
type goal =
1010
| Hole(Direction.t)
11-
| TileId([@equal (_, _) => true] Id.t)
11+
// | TileId([@equal (_, _) => true] Id.t)
1212
| BindingSiteOfIndicatedVar;
1313

1414
[@deriving (show({with_path: false}), sexp, yojson, eq)]
@@ -86,8 +86,8 @@ type paste =
8686
type probe =
8787
| ToggleManual
8888
| ToggleAuto
89-
| ToggleStatics
90-
| StepInto(Language.Sample.t, Id.t);
89+
| ToggleStatics;
90+
// | StepInto(Language.Sample.t, Id.t);
9191

9292
[@deriving (show({with_path: false}), sexp, yojson, eq)]
9393
type t =

src/haz3lcore/zipper/action/Move.re

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ let move_dispatch =
143143
| Vertical(d) => vertical(~measured, ~col_target, d, z)
144144
| Point(goal) => to_point(~measured, ~goal, z)
145145
| Goal(Hole(d)) => to_next_grout(d, z)
146-
| Goal(TileId(id)) => jump_to_id_indicated(z, id)
146+
// | Goal(TileId(id)) => jump_to_id_indicated(z, id)
147147
| Goal(BindingSiteOfIndicatedVar) =>
148148
let* ci = Indicated.ci_of(z, statics);
149149
let* binding_id = Language.Info.get_binding_site(ci);

src/web/app/Page.re

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ module Update = {
9999
(
100100
~import_log,
101101
~schedule_action,
102-
~globals: Globals.Model.t,
102+
~globals as _: Globals.Model.t,
103103
action: Globals.Update.t,
104104
model: Model.t,
105105
) => {
@@ -123,31 +123,31 @@ module Update = {
123123
settings,
124124
},
125125
};
126-
| JumpToTile(id) =>
127-
let jump =
128-
Editors.Selection.jump_to_tile(
129-
~settings=model.globals.settings,
130-
id,
131-
model.editors,
132-
);
133-
switch (jump) {
134-
| None => model |> Updated.return_quiet
135-
| Some((action, selection)) =>
136-
let* editors =
137-
Editors.Update.update(
138-
~globals,
139-
~schedule_action=a => schedule_action(Editors(a)),
140-
~send_assistant_insertion_info=
141-
assistant_callback(~schedule_action, model),
142-
action,
143-
model.editors,
144-
);
145-
{
146-
...model,
147-
editors,
148-
selection,
149-
};
150-
};
126+
// | JumpToTile(id) =>
127+
// let jump =
128+
// Editors.Selection.jump_to_tile(
129+
// ~settings=model.globals.settings,
130+
// id,
131+
// model.editors,
132+
// );
133+
// switch (jump) {
134+
// | None => model |> Updated.return_quiet
135+
// | Some((action, selection)) =>
136+
// let* editors =
137+
// Editors.Update.update(
138+
// ~globals,
139+
// ~schedule_action=a => schedule_action(Editors(a)),
140+
// ~send_assistant_insertion_info=
141+
// assistant_callback(~schedule_action, model),
142+
// action,
143+
// model.editors,
144+
// );
145+
// {
146+
// ...model,
147+
// editors,
148+
// selection,
149+
// };
150+
// };
151151
| InitImportAll(file) =>
152152
JsUtil.read_file(file, data =>
153153
schedule_action(Globals(FinishImportAll(data)))

src/web/app/editors/Editors.re

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -315,22 +315,22 @@ module Selection = {
315315
};
316316
};
317317

318-
let jump_to_tile =
319-
(~settings, tile, model: Model.t): option((Update.t, t)) =>
320-
switch (model) {
321-
| Scratch(m) =>
322-
ScratchMode.Selection.jump_to_tile(tile, m)
323-
|> Option.map(((x, y)) => (Update.Scratch(x), Scratch(y)))
324-
| Documentation(m) =>
325-
ScratchMode.Selection.jump_to_tile(tile, m)
326-
|> Option.map(((x, y)) => (Update.Scratch(x), Scratch(y)))
327-
| Tutorial(m) =>
328-
TutorialsMode.Selection.jump_to_tile(~settings, tile, m)
329-
|> Option.map(((x, y)) => (Update.Tutorial(x), Tutorial(y)))
330-
| Exercises(m) =>
331-
ExercisesMode.Selection.jump_to_tile(~settings, tile, m)
332-
|> Option.map(((x, y)) => (Update.Exercises(x), Exercises(y)))
333-
};
318+
// let jump_to_tile =
319+
// (~settings, tile, model: Model.t): option((Update.t, t)) =>
320+
// switch (model) {
321+
// | Scratch(m) =>
322+
// ScratchMode.Selection.jump_to_tile(tile, m)
323+
// |> Option.map(((x, y)) => (Update.Scratch(x), Scratch(y)))
324+
// | Documentation(m) =>
325+
// ScratchMode.Selection.jump_to_tile(tile, m)
326+
// |> Option.map(((x, y)) => (Update.Scratch(x), Scratch(y)))
327+
// | Tutorial(m) =>
328+
// TutorialsMode.Selection.jump_to_tile(~settings, tile, m)
329+
// |> Option.map(((x, y)) => (Update.Tutorial(x), Tutorial(y)))
330+
// | Exercises(m) =>
331+
// ExercisesMode.Selection.jump_to_tile(~settings, tile, m)
332+
// |> Option.map(((x, y)) => (Update.Exercises(x), Exercises(y)))
333+
// };
334334

335335
let default_selection =
336336
fun

src/web/app/editors/cell/CellEditor.re

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,10 @@ module Selection = {
179179
|> Option.map(x => Update.ResultAction(x))
180180
};
181181
};
182-
183-
let jump_to_tile = (tile, model: Model.t): option((Update.t, t)) => {
184-
CodeEditable.Selection.jump_to_tile(tile, model.editor)
185-
|> Option.map(x => (Update.MainEditor(x), MainEditor));
186-
};
182+
// let jump_to_tile = (tile, model: Model.t): option((Update.t, t)) => {
183+
// CodeEditable.Selection.jump_to_tile(tile, model.editor)
184+
// |> Option.map(x => (Update.MainEditor(x), MainEditor));
185+
// };
187186
};
188187

189188
module View = {
@@ -215,12 +214,12 @@ module View = {
215214
},
216215
~signal=
217216
fun
218-
| MakeActive(a) => signal(MakeActive(Result(a)))
219-
| JumpTo(id) =>
220-
Effect.Many([
221-
signal(MakeActive(MainEditor)),
222-
inject(MainEditor(Perform(Move(Goal(TileId(id)))))),
223-
]),
217+
| MakeActive(a) => signal(MakeActive(Result(a))),
218+
// | JumpTo(id) =>
219+
// Effect.Many([
220+
// signal(MakeActive(MainEditor)),
221+
// inject(MainEditor(Perform(Move(Goal(TileId(id)))))),
222+
// ]),
224223
~inject=a => inject(ResultAction(a)),
225224
~selected={
226225
switch (selected) {

src/web/app/editors/code/CodeEditable.re

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ module Update = {
7979
| Cut
8080
| Reparse
8181
| Introduce
82-
| Probe(StepInto(_))
82+
// | Probe(StepInto(_))
8383
| Dump => true
8484
| Project(_)
8585
| Unselect(_)
@@ -189,13 +189,12 @@ module Selection = {
189189
}
190190
};
191191
};
192-
193-
let jump_to_tile = (id: Id.t, model: Model.t): option(Update.t) => {
194-
switch (TermData.root_tile(id, model.editor.syntax.term_data)) {
195-
| Some(_) => Some(Perform(Move(Goal(TileId(id)))))
196-
| None => None
197-
};
198-
};
192+
// let jump_to_tile = (id: Id.t, model: Model.t): option(Update.t) => {
193+
// switch (TermData.root_tile(id, model.editor.syntax.term_data)) {
194+
// | Some(_) => Some(Perform(Move(Goal(TileId(id)))))
195+
// | None => None
196+
// };
197+
// };
199198
};
200199

201200
module View = {

src/web/app/editors/mode/ExercisesMode.re

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -455,21 +455,20 @@ module Selection = {
455455
| (Theorem(_), _) => None
456456
};
457457
};
458-
459-
let jump_to_tile =
460-
(~settings, tile, model: Model.t): option((Update.t, t)) => {
461-
let current = List.nth(model.exercises, model.current);
462-
switch (current) {
463-
| Implementation(e) =>
464-
ExerciseMode.Selection.jump_to_tile(~settings, tile, e)
465-
|> Option.map(((x, y)) => (Update.Exercise(x), Implementation(y)))
466-
| Theorem(e) =>
467-
TheoremExerciseMode.Selection.jump_to_tile(tile, e)
468-
|> Option.map(((x, y)) =>
469-
(Update.TheoremExercise(x), TheoremExercise(y))
470-
)
471-
};
472-
};
458+
// let jump_to_tile =
459+
// (~settings, tile, model: Model.t): option((Update.t, t)) => {
460+
// let current = List.nth(model.exercises, model.current);
461+
// switch (current) {
462+
// | Implementation(e) =>
463+
// ExerciseMode.Selection.jump_to_tile(~settings, tile, e)
464+
// |> Option.map(((x, y)) => (Update.Exercise(x), Implementation(y)))
465+
// | Theorem(e) =>
466+
// TheoremExerciseMode.Selection.jump_to_tile(tile, e)
467+
// |> Option.map(((x, y)) =>
468+
// (Update.TheoremExercise(x), TheoremExercise(y))
469+
// )
470+
// };
471+
// };
473472
};
474473

475474
module View = {

src/web/app/editors/mode/TutorialsMode.re

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -304,14 +304,14 @@ module Selection = {
304304
List.nth(model.exercises, model.current),
305305
)
306306
|> Option.map(a => Update.Tutorial(a));
307-
let jump_to_tile =
308-
(~settings, tile, model: Model.t): option((Update.t, t)) =>
309-
TutorialMode.Selection.jump_to_tile(
310-
~settings,
311-
tile,
312-
List.nth(model.exercises, model.current),
313-
)
314-
|> Option.map(((x, y)) => (Update.Tutorial(x), y));
307+
// let jump_to_tile =
308+
// (~settings, tile, model: Model.t): option((Update.t, t)) =>
309+
// TutorialMode.Selection.jump_to_tile(
310+
// ~settings,
311+
// tile,
312+
// List.nth(model.exercises, model.current),
313+
// )
314+
// |> Option.map(((x, y)) => (Update.Tutorial(x), y));
315315
};
316316

317317
module View = {

0 commit comments

Comments
 (0)