Skip to content

Commit

Permalink
revert file renames
Browse files Browse the repository at this point in the history
  • Loading branch information
7h3kk1d committed Nov 25, 2024
1 parent 205a405 commit a71561e
Show file tree
Hide file tree
Showing 19 changed files with 22 additions and 21 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/haz3lweb/app/editors/Editors.re
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ module View = {
),
],
List.map(
SlideSelect.option_view(
EditorModeView.option_view(
switch (editors) {
| Scratch(_) => "Scratch"
| Documentation(_) => "Documentation"
Expand Down
4 changes: 2 additions & 2 deletions src/haz3lweb/app/editors/mode/ExercisesMode.re
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ module View = {
~inject=globals.inject_global,
~instructor_mode=globals.settings.instructor_mode,
)
@ SlideSelect.view(
@ EditorModeView.view(
~signal=
fun
| Previous =>
Expand All @@ -484,7 +484,7 @@ module View = {
),
),
~indicator=
SlideSelect.indicator_n(
EditorModeView.indicator_n(
model.current,
List.length(model.exercises),
),
Expand Down
25 changes: 13 additions & 12 deletions src/haz3lweb/app/editors/result/EvalResult.re
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module Model = {
cached_settings: Calc.saved(Haz3lcore.CoreSettings.t),
editor: Calc.saved((Haz3lcore.Exp.t, CodeSelectable.Model.t)),
})
| Stepper(Stepper.Model.t);
| Stepper(StepperView.Model.t);

[@deriving (show({with_path: false}), sexp, yojson)]
type kind =
Expand All @@ -52,7 +52,7 @@ module Model = {
| Stepper(s) =>
Some(
s.history
|> Stepper.Model.get_state
|> StepperView.Model.get_state
|> Haz3lcore.EvaluatorState.get_tests
|> Haz3lcore.TestResults.mk_results,
)
Expand All @@ -74,7 +74,7 @@ module Model = {
| Stepper(s) =>
Some(
s.history
|> Stepper.Model.get_state
|> StepperView.Model.get_state
|> Haz3lcore.EvaluatorState.get_tests
|> Haz3lcore.TestResults.mk_results,
)
Expand All @@ -85,7 +85,7 @@ module Model = {
let get_elaboration = (model: t): option(Haz3lcore.Exp.t) =>
switch (model.result) {
| Evaluation({elab, _}) => Some(elab)
| Stepper(s) => Stepper.Model.get_elaboration(s)
| Stepper(s) => StepperView.Model.get_elaboration(s)
| _ => None
};
};
Expand All @@ -96,7 +96,7 @@ module Update = {
[@deriving (show({with_path: false}), sexp, yojson)]
type t =
| ToggleStepper
| StepperAction(Stepper.Update.t)
| StepperAction(StepperView.Update.t)
| EvalEditorAction(CodeSelectable.Update.t)
| UpdateResult(Haz3lcore.ProgramResult.t(Haz3lcore.ProgramResult.inner));

Expand All @@ -108,7 +108,7 @@ module Update = {
| (ToggleStepper, {kind: Evaluation, _}) =>
{...model, kind: Stepper} |> Updated.return
| (StepperAction(a), {result: Stepper(s), _}) =>
let* stepper = Stepper.Update.update(~settings, a, s);
let* stepper = StepperView.Update.update(~settings, a, s);
{...model, result: Stepper(stepper)};
| (StepperAction(_), _) => model |> Updated.return_quiet
| (
Expand Down Expand Up @@ -223,11 +223,12 @@ module Update = {
}
| (Evaluation, _) => {...model, result: NoElab}
| (Stepper, Stepper(s)) =>
let s' = Stepper.Update.calculate(~settings, elab, s);
let s' = StepperView.Update.calculate(~settings, elab, s);
{...model, result: Stepper(s')};
| (Stepper, _) =>
let s =
Stepper.Model.init() |> Stepper.Update.calculate(~settings, elab);
StepperView.Model.init()
|> StepperView.Update.calculate(~settings, elab);
{...model, result: Stepper(s)};
};

Expand Down Expand Up @@ -289,7 +290,7 @@ module Selection = {
[@deriving (show({with_path: false}), sexp, yojson)]
type t =
| Evaluation(CodeSelectable.Selection.t)
| Stepper(Stepper.Selection.t);
| Stepper(StepperView.Selection.t);

let get_cursor_info = (~selection: t, mr: Model.t): cursor(Update.t) =>
switch (selection, mr.result) {
Expand All @@ -299,7 +300,7 @@ module Selection = {
CodeSelectable.Selection.get_cursor_info(~selection, editor |> snd);
Update.EvalEditorAction(ci);
| (Stepper(selection), Stepper(s)) =>
let+ ci = Stepper.Selection.get_cursor_info(~selection, s);
let+ ci = StepperView.Selection.get_cursor_info(~selection, s);
Update.StepperAction(ci);
| (_, Evaluation(_)) => empty
| (_, Stepper(_)) => empty
Expand All @@ -317,7 +318,7 @@ module Selection = {
)
|> Option.map(x => Update.EvalEditorAction(x))
| (Stepper(selection), Stepper(s)) =>
Stepper.Selection.handle_key_event(~selection, s, ~event)
StepperView.Selection.handle_key_event(~selection, s, ~event)
|> Option.map(x => Update.StepperAction(x))
| (_, Evaluation(_)) => None
| (_, Stepper(_)) => None
Expand Down Expand Up @@ -443,7 +444,7 @@ module View = {
),
]
| Stepper(s) =>
Stepper.View.view(
StepperView.View.view(
~globals,
~selection=
switch (selected) {
Expand Down
2 changes: 1 addition & 1 deletion src/haz3lweb/app/inspector/CursorInspector.re
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ let tpat_view = (~globals, _: Cls.t, status: Info.status_tpat) => {
);
switch (status) {
| NotInHole(Empty) => div_ok([text("Fillable with a new alias")])
| NotInHole(Var(name)) => div_ok([CtxInspector.alias_view(name)])
| NotInHole(Var(name)) => div_ok([ContextInspector.alias_view(name)])
| InHole(NotAVar(NotCapitalized)) =>
div_err([text("Must begin with a capital letter")])
| InHole(NotAVar(_)) => div_err([text("Expected an alias")])
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ module View = {
switch (specific_ctx) {
| None => Node.div([text("No context available")]) // TODO show exercise configuration error
| Some(specific_ctx) =>
CtxInspector.ctx_view(~globals, specific_ctx)
ContextInspector.ctx_view(~globals, specific_ctx)
};
};
};
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/haz3lweb/app/Page.re → src/haz3lweb/view/Page.re
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ module View = {
),
sidebar,
bottom_bar,
CtxInspector.view(~globals, cursor.info),
ContextInspector.view(~globals, cursor.info),
];
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ module View = {
~inject: Update.t => 'a,
model: Model.t,
) => {
SlideSelect.view(
EditorModeView.view(
~signal=
fun
| Previous =>
Expand All @@ -363,12 +363,12 @@ module View = {
),
~indicator=
named_slides
? SlideSelect.indicator_select(
? EditorModeView.indicator_select(
~signal=i => inject(SwitchSlide(i)),
model.current,
List.map(((s, _)) => s, model.scratchpads),
)
: SlideSelect.indicator_n(
: EditorModeView.indicator_n(
model.current,
List.length(model.scratchpads),
),
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit a71561e

Please sign in to comment.