@@ -56,8 +56,6 @@ declare Module BSkel Sort :- std.do! [
5656 if-verbose (coq.say {header} "structure: mixin first class" MixinFirstClass),
5757
5858
59- private.declare-auto-infer-params-abbrev Structure MLwP LocType PHClauses,
60-
6159 if-verbose (coq.say {header} "declaring clone abbreviation"),
6260 w-params.then MLwP phant.fun-real phant.fun-real
6361 (private.clone-phant-body ClassName SortProjection Structure) PhClone,
@@ -89,11 +87,7 @@ declare Module BSkel Sort :- std.do! [
8987
9088 if (get-option "short.type" ShortType) (
9189 if-verbose (coq.say {header} "short name for type:" ShortType),
92- if (LocType = loc-abbreviation StrTypeAbbrev) (std.do! [
93- coq.notation.abbreviation-body StrTypeAbbrev NStrTypeAbbrev StrTypeTm,
94- @global! => log.coq.notation.add-abbreviation
95- ShortType NStrTypeAbbrev StrTypeTm ff _
96- ]) (@global! => log.coq.notation.add-abbreviation
90+ (@global! => log.coq.notation.add-abbreviation
9791 ShortType 0 (global Structure) ff _)) true,
9892
9993 coq.mk-app (global Structure) {coq.mk-n-holes {w-params.nparams MLwP}} HB_Instance,
@@ -133,7 +127,7 @@ declare Module BSkel Sort :- std.do! [
133127 std.flatten [
134128 Factories, [ClassAlias], [is-structure Structure],
135129 NewJoins, [class-def CurrentClass], GRDepsClauses,
136- [gref-deps GRPack MLwP], MixinMems, [StructKeyClause], PHClauses
130+ [gref-deps GRPack MLwP], MixinMems, [StructKeyClause]
137131 ]
138132 NewClauses,
139133 acc-clauses current NewClauses,
@@ -449,9 +443,7 @@ synthesize-fields.body _Params T ML (record "axioms_" {{ Type }} "Class" FS) :-
449443
450444pred mk-record+sort-field i:sort, i:name, i:term, i:(term -> record-decl), o:indt-decl.
451445pred mk-record+sort-field i:universe, i:name, i:term, i:(term -> record-decl), o:indt-decl.
452- mk-record+sort-field Sort _ T F (record RecordName (sort Sort) "Pack" (field _ "sort" T F)) :- !, std.do! [
453- if (get-option "infer" _) (RecordName = "type_") (RecordName = "type")
454- ].
446+ mk-record+sort-field Sort _ T F (record "type" (sort Sort) "Pack" (field _ "sort" T F)).
455447
456448pred mk-class-field i:classname, i:list term, i:term, i:list (w-args mixinname), o:record-decl.
457449mk-class-field ClassName Params T _ (field [canonical ff] "class" (app [global ClassName|Args]) _\end-record) :-
@@ -591,27 +583,6 @@ pack-body.aux PL T BuildC PackS Body :- !, std.do! [
591583 mk-app (global PackS) {std.append PL [T, Class]} Body
592584].
593585
594- pred declare-auto-infer-params-abbrev i:structure, i:mixins, o:located, o:list prop.
595- declare-auto-infer-params-abbrev GR MLwP (loc-abbreviation Abbrev) [phant-abbrev GR (const PhC) Abbrev] :-
596- get-option "infer" Map, !,
597- Map => mk-infer (global GR) MLwP PhT,
598- phant.add-abbreviation "type" PhT PhC Abbrev.
599- declare-auto-infer-params-abbrev GR _ (loc-gref GR) [].
600-
601- pred mk-infer i:term, i:mixins, o:phant-term.
602- mk-infer T (w-params.nil _ _ _) PH :- phant.init T PH.
603- mk-infer T (w-params.cons ID Ty W) R :- (get-option ID "Type" ; get-option ID ""), !,
604- @pi-parameter ID Ty t\ mk-infer {mk-app T [t]} (W t) (PhT t),
605- phant.fun-infer-type sortclass {coq.id->name ID} Ty PhT R.
606- mk-infer T (w-params.cons ID Ty W) R :- (get-option ID "_ -> _"), !,
607- @pi-parameter ID Ty t\ mk-infer {mk-app T [t]} (W t) (PhT t),
608- phant.fun-infer-type funclass {coq.id->name ID} Ty PhT R.
609- mk-infer T (w-params.cons ID Ty W) R :- not (get-option ID _), !,
610- @pi-parameter ID Ty t\ mk-infer {mk-app T [t]} (W t) (PhT t),
611- phant.fun-real {coq.id->name ID} Ty PhT R.
612- mk-infer _ (w-params.cons ID _ _) _ :- get-option ID Infer,
613- coq.error "Automatic inference of paramter" ID "from" Infer "not supported".
614-
615586pred mk-infer-key i:class, i:term, i:mixins, i:term, o:phant-term.
616587mk-infer-key CoeClass K (w-params.nil ID _ _) St PhK :-
617588 @pi-parameter ID St t\ phant.init {mk-app K [t]} (PhKBo t),
0 commit comments