From 0b807ccaece0b319c52ab8a67f0c68b60f7b3454 Mon Sep 17 00:00:00 2001 From: disconcision Date: Thu, 16 May 2024 19:52:11 -0400 Subject: [PATCH] cleanup --- src/haz3lcore/zipper/Projector.re | 5 +---- src/haz3lcore/zipper/action/Perform.re | 2 +- src/haz3lweb/view/Page.re | 1 - src/haz3lweb/view/ProjectorsUpdate.re | 6 +++--- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/haz3lcore/zipper/Projector.re b/src/haz3lcore/zipper/Projector.re index 884a8ca256..e48a28466c 100644 --- a/src/haz3lcore/zipper/Projector.re +++ b/src/haz3lcore/zipper/Projector.re @@ -2,10 +2,7 @@ open Util; open Sexplib.Std; [@deriving (show({with_path: false}), sexp, yojson)] -type infer = { - id: Id.t, - expected_ty: option(Typ.t), -}; +type infer = {expected_ty: option(Typ.t)}; [@deriving (show({with_path: false}), sexp, yojson)] type t = diff --git a/src/haz3lcore/zipper/action/Perform.re b/src/haz3lcore/zipper/action/Perform.re index 8f36287512..7ef1124719 100644 --- a/src/haz3lcore/zipper/action/Perform.re +++ b/src/haz3lcore/zipper/action/Perform.re @@ -84,7 +84,7 @@ let go_z = | Fold => let f = _ => //TODO(andrew) - Some(Projector.Infer({id, expected_ty: None})); + Some(Projector.Infer({expected_ty: None})); {...z, projectors: Projector.Map.update(id, f, z.projectors)}; | Infer(_) => { ...z, diff --git a/src/haz3lweb/view/Page.re b/src/haz3lweb/view/Page.re index c1a79dadad..a7dd4674f0 100644 --- a/src/haz3lweb/view/Page.re +++ b/src/haz3lweb/view/Page.re @@ -12,7 +12,6 @@ let handlers = (~inject: UpdateAction.t => Ui_effect.t(unit), model: Model.t) => open Effect; let key = Key.mk(dir, evt); let editor = Editors.get_editor(model.editors); - // dispatch to projector if one is indicated switch (ProjectorsView.dispatch_key_to(editor, key)) { | Some(action) => Many([Prevent_default, Stop_propagation, inject(action)]) diff --git a/src/haz3lweb/view/ProjectorsUpdate.re b/src/haz3lweb/view/ProjectorsUpdate.re index 6285e47176..5bcba5e440 100644 --- a/src/haz3lweb/view/ProjectorsUpdate.re +++ b/src/haz3lweb/view/ProjectorsUpdate.re @@ -4,14 +4,14 @@ open Projector; let update = (ci: option(Info.t), p: t): t => switch (p) { | Fold => Fold - | Infer({id, _}) => - print_endline("updating infer projector id:" ++ Id.show(id)); + | Infer(_) => + print_endline("updating infer projector"); let expected_ty = switch (ci) { | Some(InfoExp({mode, _}) | InfoPat({mode, _})) => Mode.ty_of(mode) | _ => Typ.Float }; - Infer({id, expected_ty: Some(expected_ty)}); + Infer({expected_ty: Some(expected_ty)}); }; let update_all = ({settings, editors, statics, _} as model: Model.t): Model.t => {