@@ -56,8 +56,6 @@ declare Module BSkel Sort :- std.do! [
56
56
if-verbose (coq.say {header} "structure: mixin first class" MixinFirstClass),
57
57
58
58
59
- private.declare-auto-infer-params-abbrev Structure MLwP LocType PHClauses,
60
-
61
59
if-verbose (coq.say {header} "declaring clone abbreviation"),
62
60
w-params.then MLwP phant.fun-real phant.fun-real
63
61
(private.clone-phant-body ClassName SortProjection Structure) PhClone,
@@ -89,11 +87,7 @@ declare Module BSkel Sort :- std.do! [
89
87
90
88
if (get-option "short.type" ShortType) (
91
89
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
97
91
ShortType 0 (global Structure) ff _)) true,
98
92
99
93
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! [
133
127
std.flatten [
134
128
Factories, [ClassAlias], [is-structure Structure],
135
129
NewJoins, [class-def CurrentClass], GRDepsClauses,
136
- [gref-deps GRPack MLwP], MixinMems, [StructKeyClause], PHClauses
130
+ [gref-deps GRPack MLwP], MixinMems, [StructKeyClause]
137
131
]
138
132
NewClauses,
139
133
acc-clauses current NewClauses,
@@ -449,9 +443,7 @@ synthesize-fields.body _Params T ML (record "axioms_" {{ Type }} "Class" FS) :-
449
443
450
444
pred mk-record+sort-field i:sort, i:name, i:term, i:(term -> record-decl), o:indt-decl.
451
445
pred 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)).
455
447
456
448
pred mk-class-field i:classname, i:list term, i:term, i:list (w-args mixinname), o:record-decl.
457
449
mk-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! [
591
583
mk-app (global PackS) {std.append PL [T, Class]} Body
592
584
].
593
585
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
-
615
586
pred mk-infer-key i:class, i:term, i:mixins, i:term, o:phant-term.
616
587
mk-infer-key CoeClass K (w-params.nil ID _ _) St PhK :-
617
588
@pi-parameter ID St t\ phant.init {mk-app K [t]} (PhKBo t),
0 commit comments