Skip to content

Commit

Permalink
don't forget to mark degrouted in convex grout case
Browse files Browse the repository at this point in the history
  • Loading branch information
dm0n3y committed Oct 27, 2024
1 parent b7eb795 commit 5f26290
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/core/parser/Grouter.re
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,19 @@ let rec degrout = (c: Cell.t): Cells.t =>
| [hd, ...tl] when Cell.Space.is_space(l) =>
let l = Cell.mark_degrouted(l, ~side=R);
[Cell.pad(~squash=false, ~l, hd), ...tl];
| [] when Cell.Space.is_space(l) =>
let l = Cell.mark_degrouted(l, ~side=R);
[l];
| _ => [l, ...cells]
};
let cells_lr =
switch (Lists.Framed.ft(cells_l)) {
| Some((pre, ft)) when Cell.Space.is_space(r) =>
let r = Cell.mark_degrouted(~side=L, r);
Lists.Framed.put_ft(pre, Cell.pad(~squash=false, ft, ~r));
| None when Cell.Space.is_space(r) =>
let r = Cell.mark_degrouted(~side=L, r);
[r];
| _ => cells_l @ [r]
};
List.concat_map(degrout, cells_lr);
Expand Down
8 changes: 6 additions & 2 deletions src/core/structure/marks/Marks.re
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,13 @@ module Cell = {
let pp = (out, {cursor, obligs, dirty, degrouted} as marks) =>
if (is_empty(marks)) {
Fmt.nop(out, marks);
} else if (Option.is_none(cursor) && Path.Map.is_empty(dirty)) {
} else if (Option.is_none(cursor)
&& Path.Map.is_empty(dirty)
&& !degrouted) {
Fmt.pf(out, "obligs: %a", Path.Map.pp(Mtrl.T.pp), obligs);
} else if (Path.Map.is_empty(obligs) && Path.Map.is_empty(dirty)) {
} else if (Path.Map.is_empty(obligs)
&& Path.Map.is_empty(dirty)
&& !degrouted) {
Fmt.pf(out, "cursor: %a", Path.Cursor.pp, Option.get(cursor));
} else {
Fmt.pf(
Expand Down

0 comments on commit 5f26290

Please sign in to comment.