Skip to content

Commit

Permalink
Print perform errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Negabinary committed Nov 1, 2024
1 parent 8726b1c commit 316af0b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/haz3lcore/zipper/Printer.re
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ let to_rows =
};

let measured = z =>
z |> Zipper.seg_without_buffer |> Measured.of_segment(_, Id.Map.empty);
z
|> ProjectorPerform.Update.remove_all
|> Zipper.seg_without_buffer
|> Measured.of_segment(_, Id.Map.empty);

let pretty_print = (~holes: option(string)=Some(""), z: Zipper.t): string =>
to_rows(
Expand All @@ -78,7 +81,7 @@ let zipper_to_string =
)
|> String.concat("\n");

let to_string_selection = (zipper: Zipper.t): string =>
let to_string_selection = (zipper: Zipper.t): string => {
to_rows(
~measured=measured(zipper),
~caret=None,
Expand All @@ -87,6 +90,7 @@ let to_string_selection = (zipper: Zipper.t): string =>
~segment=zipper.selection.content,
)
|> String.concat("\n");
};

let zipper_of_string =
(~zipper_init=Zipper.init(), str: string): option(Zipper.t) => {
Expand Down

0 comments on commit 316af0b

Please sign in to comment.