Skip to content

Commit

Permalink
Add support for displaying TupLabel with label and type in view_ty fu…
Browse files Browse the repository at this point in the history
…nction
  • Loading branch information
7h3kk1d committed Oct 13, 2024
1 parent c27642b commit bcd9fe2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/haz3lweb/view/Type.re
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ let rec view_ty = (~strip_outer_parens=false, ty: Haz3lcore.Typ.t): Node.t =>
| Label(name) => ty_view("Label", name)
| Bool => ty_view("Bool", "Bool")
| Var(name) => ty_view("Var", name)
| TupLabel(_, ty) => view_ty(ty) // TODO (Anthony): What to do here?
| TupLabel({term: Label(l), _}, ty) =>
div(
~attrs=[clss(["typ-view", "TupLabel"])],
[text(l ++ "="), view_ty(ty)],
)
| TupLabel(_, ty) => view_ty(ty) // This should be impossible
| Rec(name, t) =>
div(
~attrs=[clss(["typ-view", "Rec"])],
Expand Down

0 comments on commit bcd9fe2

Please sign in to comment.