Skip to content

Commit

Permalink
only output plain comments in generated Coq code
Browse files Browse the repository at this point in the history
  • Loading branch information
palmskog committed Dec 29, 2024
1 parent 8a46822 commit ed36d0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/defns.ml
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ let pp_fun_or_reln_defnclass_list
List.iter (fun frdc -> pp_fun_or_reln_defnclass fd m xd lookup frdc) frdcs
| Coq co ->
pp_auxiliary_list_rules fd m xd frdcs;
output_string fd "(** definitions *)\n";
output_string fd "(* definitions *)\n";
List.iter (fun frdc -> pp_fun_or_reln_defnclass fd m xd lookup frdc) frdcs;
| Tex _ ->
output_string fd "% defnss\n";
Expand Down
6 changes: 2 additions & 4 deletions src/grammar_pp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1401,8 +1401,7 @@ and pp_com_es m xd homs es =
^ String.concat "" (apply_hom_spec m xd hs ((*List.map (function s -> "$"^s^"$")*) ss))
^ "}"
| Isa _ -> " \\<comment> \\<open>" ^ String.concat "" (apply_hom_spec m xd hs ss) ^ "\\<close>"
| Coq _ -> " (*r " ^ String.concat "" (apply_hom_spec m xd hs ss) ^ " *)"
| Hol _ | Lem _ | Caml _ | Lex _ -> " (* " ^ String.concat "" (apply_hom_spec m xd hs ss) ^ " *)"
| Coq _ | Hol _ | Lem _ | Caml _ | Lex _ -> " (* " ^ String.concat "" (apply_hom_spec m xd hs ss) ^ " *)"
| Menhir _ -> "/* " ^ String.concat "" (apply_hom_spec m xd hs ss) ^ " */"
| Ascii _ | Twf _ -> ""

Expand All @@ -1416,8 +1415,7 @@ and pp_com_strings m xd homs ss =
^ String.concat "" (apply_hom_spec m xd hs (List.map (function s -> "$"^s^"$") ss))
^ "}"
| Isa _ -> " \\<comment> \\<open>" ^ String.concat "" (apply_hom_spec m xd hs ss) ^ "\\<close>"
| Coq _ -> " (*r " ^ String.concat "" (apply_hom_spec m xd hs ss) ^ " *)"
| Hol _ | Lem _ | Caml _ | Lex _ -> " (* " ^ String.concat "" (apply_hom_spec m xd hs ss) ^ " *)"
| Coq _ | Hol _ | Lem _ | Caml _ | Lex _ -> " (* " ^ String.concat "" (apply_hom_spec m xd hs ss) ^ " *)"
| Menhir _ -> "/* " ^ String.concat "" (apply_hom_spec m xd hs ss) ^ " */"
| Ascii _ | Twf _ -> ""

Expand Down

0 comments on commit ed36d0e

Please sign in to comment.