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
In the context of mathcomp we use can_type (and others) as a leightweight factory for equality, choice, countability, finiteness by cancellation. HB.howto is not aware of that and fails to inform a user.
Reduced example:
From HB RequireImport structures.
HB.mixin Record hasPoint T := { point : T }.
HB.structure Definition Pointed := { T of hasPoint T }.
HB.instance Definition _ := hasPoint.Build unit tt.
(* types which are the image of a pointed type are pointed *)Definition image_type {T} {iT} (f : T -> iT) := iT.
HB.instance Definition _ (pT : Pointed.type) iT (f : pT -> iT) :=
hasPoint.Build (image_type f) (f point).
(* HB.howto does not know image_type can be used to make a Pointed.type *)
HB.howto Pointed.type.
HB.instance Definition _ := Pointed.on (image_type (fun _ : unit => true)).
Ideally we would annotate the instance on image_type to flag it as a lightweight factory, for example with an attribute #[light-factory]
The text was updated successfully, but these errors were encountered:
In the context of mathcomp we use
can_type
(and others) as a leightweight factory for equality, choice, countability, finiteness by cancellation.HB.howto
is not aware of that and fails to inform a user.Reduced example:
Ideally we would annotate the instance on
image_type
to flag it as a lightweight factory, for example with an attribute#[light-factory]
The text was updated successfully, but these errors were encountered: