(** 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]. For that, we'd need to coerce [A:Type] to the type [IType] by applying on-the-fly the operation [IType_make A _]. Thus, we need something like: [Coercion (fun (A:Type) => IType_make A _) : Sortclass >-> IType.] Would that be possible?
I understand that [IType_type] is already a reverse coercion from [IType] to [Type], but I don't see why it would necessarily cause trouble to have cycles
in the coercion graphs. *)
Messung V0.5
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet)
¤
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.