Skip to content

Commit

Permalink
Fix redundant :math:s in prose backend
Browse files Browse the repository at this point in the history
  • Loading branch information
jaehyun1ee committed Feb 5, 2024
1 parent 988ca17 commit 9a1f564
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spectec/src/backend-prose/render.ml
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ and render_expr' env expr =
| Al.Ast.BoolE b -> string_of_bool b
| Al.Ast.UnE (NotOp, { it = Al.Ast.IsCaseOfE (e, kwd); _ }) ->
let se = render_expr env e in
let skwd = render_math (render_kwd env kwd) in
let skwd = render_kwd env kwd in
sprintf "%s is not of the case %s" se skwd
| Al.Ast.UnE (NotOp, { it = Al.Ast.IsDefinedE e; _ }) ->
let se = render_expr env e in
Expand Down Expand Up @@ -350,15 +350,15 @@ and render_expr' env expr =
let se2 = render_expr env e2 in
sprintf "the label whose arity is %s and whose continuation is %s" se1 se2
| Al.Ast.ContextKindE (kwd, e) ->
let skwd = render_math (render_kwd env kwd) in
let skwd = render_kwd env kwd in
let se = render_expr env e in
sprintf "%s is %s" se skwd
| Al.Ast.IsDefinedE e ->
let se = render_expr env e in
sprintf "%s is defined" se
| Al.Ast.IsCaseOfE (e, kwd) ->
let se = render_expr env e in
let skwd = render_math (render_kwd env kwd) in
let skwd = render_kwd env kwd in
sprintf "%s is of the case %s" se skwd
| Al.Ast.HasTypeE (e, t) ->
let se = render_expr env e in
Expand Down Expand Up @@ -395,7 +395,7 @@ and render_path env path =
let se2 = render_expr env e2 in
sprintf "the slice from %s to %s" se1 se2
| Al.Ast.DotP kwd ->
sprintf "the field %s" (render_math (render_kwd env kwd))
sprintf "the field %s" (render_kwd env kwd)

and render_paths env paths =
let spaths = List.map (render_path env) paths in
Expand Down

0 comments on commit 9a1f564

Please sign in to comment.