Record N := C { T : Type; _ : True }. Checkfun x:N => let 'C _ p := x in p. Checkfun x:N => let 'C T _ := x in T. Checkfun x:N => let 'C T p := x in (T,p).
Record M := D { U : Type; a := 0; q : True }. Checkfun x:M => let 'D T _ p := x in p. Checkfun x:M => let 'D T _ p := x in T. Checkfun x:M => let 'D T p := x in (T,p). Checkfun x:M => let 'D T a p := x in (T,p,a). Checkfun x:M => let '{|U:=T;a:=a;q:=p|} := x in (T,p,a).
Module FormattingIssue13142.
Record T {A B} := {a:A;b:B}.
Module LongModuleName.
Record test := { long_field_name0 : nat;
long_field_name1 : nat;
long_field_name2 : nat;
long_field_name3 : nat }. End LongModuleName.
Definition d := fun '{| LongModuleName.long_field_name0 := a;
LongModuleName.long_field_name1 := b;
LongModuleName.long_field_name2 := c;
LongModuleName.long_field_name3 := d |} => (a,b,c,d).
Check {|a:=0;b:=0|}. Checkfun '{| LongModuleName.long_field_name0:=_ |} => 0. Evalcompute in {|a:=c;b:=d|}. Import LongModuleName. Evalcompute in {|a:=c;b:=d|}.
End FormattingIssue13142.
Module ProjectionPrinting.
Notation"a +++ b" := (a * b) (at level 40, format "'[v' a '/' +++ '/' b ']'").
Record R := { field : nat -> nat }. Set Printing Projections. Checkfun x => 0 +++ x.(field) 0.
End ProjectionPrinting.
Module RecordImplicitParameters.
(* Check that implicit parameters are treated independently of extra implicit arguments (at some time they did not and it was failing at
typing time) *)
Record R A := { f : A -> A }.
Fail Checkfun x => x.(f).
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.