You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
std.assert-ok! (coq.typecheck B Ty) "Builder illtyped",
107
+
pred factory-provides.one i:list term, i:term, i:gref-or-primitive, i:mixinname, o:w-args mixinname.
108
+
factory-provides.one Params T (gref B) M (triple M PL T) :- std.do! [
109
+
coq.env.typeof B Ty,
110
110
subst-prod [T] {subst-prod Params Ty} TyParams,
111
111
std.assert! (extract-conclusion-params T TyParams PL) "The conclusion of a builder is a mixin whose parameters depend on other mixins",
112
112
].
113
+
factory-provides.one Params T (primitive (pr P N)) M (triple M PL T) :- std.do! [
114
+
coq.mk-app {coq.mk-app (global M) Params} [T] TyM, % fine since M is the class hence no extra arg needed
115
+
std.assert-ok! (d\@pi-decl `m` TyM m\coq.typecheck (app[primitive(proj P N),m]) (TyParams m) d) "Builder illtyped",
116
+
@pi-decl `m` TyM m\
117
+
std.assert! (extract-conclusion-params T (TyParams m) PL) "The conclusion of a primitive projection is a mixin whose parameters depend on other mixins"
118
+
].
113
119
114
120
pred extract-conclusion-params i:term, i:term, o:list term.
115
121
extract-conclusion-params TheType (prod _ S T) R :- !,
0 commit comments