Skip to content

Commit 79d06ea

Browse files
committed
explicit type in type param for term abbrevs
2 parents 6eb8ba9 + 21894e2 commit 79d06ea

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

main.ml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,11 @@ and command = function
12271227
let decl_type_abbrevs oc =
12281228
let abbrev s (idx,(_d,n)) =
12291229
string oc "symbol type"; int oc idx;
1230-
for i=0 to n-1 do string oc " a"; int oc i done;
1230+
if n > 0 then begin
1231+
string oc " (a0";
1232+
for i=1 to n-1 do string oc " a"; int oc i done;
1233+
string oc " : Set)"
1234+
end;
12311235
string oc ""; string oc s; string oc ";\n"
12321236
in
12331237
MapStr.iter abbrev map

xlp.ml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ let decl_type_abbrevs oc =
120120
let abbrev s (k,n) =
121121
string oc "symbol type"; digest oc k;
122122
if n > 0 then begin
123-
string oc " (a0"; for i=1 to n-1 do string oc " a"; int oc i done;
123+
string oc " (a0";
124+
for i=1 to n-1 do string oc " a"; int oc i done;
124125
string oc " : Set)"
125126
end;
126127
string oc ""; string oc s; string oc ";\n"
@@ -374,9 +375,14 @@ let print_let oc (t,t',_,_) =
374375

375376
let decl_term_abbrev oc t (k,ntvs,bs) =
376377
let n = "term"^string_of_int k in
377-
if ntvs > 0 then raw_update_tvs_map n ntvs;
378378
string oc "symbol "; string oc n;
379-
for i=0 to ntvs-1 do string oc " a"; int oc i done;
379+
if ntvs > 0 then
380+
begin
381+
raw_update_tvs_map n ntvs;
382+
string oc " (a0";
383+
for i=1 to ntvs-1 do string oc " a"; int oc i done;
384+
string oc " : Set)"
385+
end;
380386
let decl_var i b =
381387
string oc " (x"; int oc i; string oc ": El "; abbrev_typ oc b; char oc ')'
382388
in

0 commit comments

Comments
 (0)