DelimitScope g_scope with g.
Bind Scope g_scope with carrier.
Section foo. Variable g : group. Variable comp : carrier g -> carrier g -> carrier g.
Check comp 1 1. End foo. End success.
Module failure. Set Primitive Projections.
Record group :=
{ carrier : Type;
id : carrier }.
Notation"1" := (id _) : g_scope.
DelimitScope g_scope with g.
Bind Scope g_scope with carrier.
Section foo. Variable g : group. Variable comp : carrier g -> carrier g -> carrier g.
Check comp 1 1. (* Toplevel input, characters 11-12: Error: In environment g : group comp : carrier g -> carrier g -> carrier g The term "1" has type "nat" while it is expected to have type "carrier g".
*) End foo. End failure.
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 ist noch experimentell.