File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1225,7 +1225,16 @@ and command = function
12251225 Array. iter gen_sed_file files;
12261226 (* generate [b^"_type_abbrevs.lp"] *)
12271227 let decl_type_abbrevs oc =
1228- MapStr. iter (Xlp. decl_type_abbrev int oc) map
1228+ let abbrev s (k ,(_ ,n )) =
1229+ string oc " symbol type" ; int oc k;
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 ;
1235+ string oc " ≔ " ; string oc s; string oc " ;\n "
1236+ in
1237+ MapStr. iter abbrev map
12291238 in
12301239 Xlp. export (b^ " _type_abbrevs" ) [b^ " _types" ] decl_type_abbrevs
12311240
Original file line number Diff line number Diff line change @@ -115,22 +115,15 @@ let abbrev_typ oc b =
115115
116116let typ = abbrev_typ;;
117117
118- let decl_type_abbrev f oc s (idx ,(_d ,n )) =
119- string oc " symbol type" ; f oc idx;
120- if n > 0 then begin
121- string oc " (a0" ;
122- for i= 1 to n-1 do string oc " a" ; int oc i done ;
123- string oc " : Set)"
124- end ;
125- string oc " ≔ " ; string oc s; string oc " ;\n "
126- ;;
127-
128118(* [decl_type_abbrevs oc] outputs on [oc] the type abbreviations. *)
129119let decl_type_abbrevs oc =
130120 let abbrev s (k ,n ) =
131121 string oc " symbol type" ; digest oc k;
132- for i= 0 to n-1 do string oc " a" ; int oc i done ;
133- (* We can use [raw_typ] here since [b] is canonical. *)
122+ if n > 0 then begin
123+ string oc " (a0" ;
124+ for i= 1 to n-1 do string oc " a" ; int oc i done ;
125+ string oc " : Set)"
126+ end ;
134127 string oc " ≔ " ; string oc s; string oc " ;\n "
135128 in
136129 MapStr. iter abbrev ! map_typ_abbrev
You can’t perform that action at this time.
0 commit comments