Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
disconcision committed May 16, 2024
1 parent b836796 commit 0b807cc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
5 changes: 1 addition & 4 deletions src/haz3lcore/zipper/Projector.re
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion src/haz3lcore/zipper/action/Perform.re
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/haz3lweb/view/Page.re
Original file line number Diff line number Diff line change
Expand Up @@ -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)])
Expand Down
6 changes: 3 additions & 3 deletions src/haz3lweb/view/ProjectorsUpdate.re
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit 0b807cc

Please sign in to comment.