(** A [IType] can be provided where an type [A] with a proof of [Inhab A] is expected. *) Parameter K : forall (A:Type) (IA:Inhab A), P A. Lemma testK : forall (A:IType), P A. Proof using. intros. eapply K. eauto with typeclass_instances. Qed.
(** A type [A] can be provided where a [IType] is expected, by wrapping it with [IType_make]. *) Parameter T : forall (A:IType), P A. Lemma testT : forall (A:Type) (IA:Inhab A), P A. Proof using. intros. eapply (T A). Qed.
(* Above, it would be nice to write [eapply (T A)], or just [eapply T]. Forthat,we'dneedtocoerce[A:Type]tothetype[IType] byapplyingon-the-flytheoperation[IType_makeA_].Thus,weneedsomethinglike: [Coercion(fun(A:Type)=>IType_makeA_):Sortclass>->IType.] Wouldthatbepossible?
Iunderstandthat[IType_type]isalreadyareversecoercionfrom[IType]to[Type], butIdon'tseewhyitwouldnecessarilycausetroubletohavecycles
in the coercion graphs. *)
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-09-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.