Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,11 @@ and command = function
let decl_type_abbrevs oc =
let abbrev s (idx,(_d,n)) =
string oc "symbol type"; int oc idx;
for i=0 to n-1 do string oc " a"; int oc i done;
if n > 0 then begin
string oc " (a0";
for i=1 to n-1 do string oc " a"; int oc i done;
string oc " : Set)"
end;
string oc " ≔ "; string oc s; string oc ";\n"
in
MapStr.iter abbrev map
Expand Down
7 changes: 5 additions & 2 deletions xlp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,11 @@ let typ = abbrev_typ;;
let decl_type_abbrevs oc =
let abbrev s (k,n) =
string oc "symbol type"; digest oc k;
for i=0 to n-1 do string oc " a"; int oc i done;
(* We can use [raw_typ] here since [b] is canonical. *)
if n > 0 then begin
string oc " (a0";
for i=1 to n-1 do string oc " a"; int oc i done;
string oc " : Set)"
end;
string oc " ≔ "; string oc s; string oc ";\n"
in
MapStr.iter abbrev !map_typ_abbrev
Expand Down