File: default_record.v

package info (click to toggle)
coq 8.20.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 44,116 kB
  • sloc: ml: 234,160; sh: 4,301; python: 3,270; ansic: 2,644; makefile: 882; lisp: 172; javascript: 63; xml: 24; sed: 2
file content (28 lines) | stat: -rw-r--r-- 654 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Require Import Ltac2.Ltac2.

Ltac2 Type 'a foo := { a : 'a; b : 'a }.

Ltac2 foo1 () := { { a := (); b := () } with a := () }.

Fail Ltac2 foo2 () := { { a := (); b := () } with a := 2 }.

Ltac2 Type ('a,'b) bar := { aa : 'a; bb : 'b }.

Ltac2 bar1 () := { { aa := (); bb := () } with aa := () }.

Ltac2 bar2 () := { { aa := (); bb := () } with aa := 2 }.

Fail Ltac2 foobar () := { { a := (); b := () } with aa := () }.

Ltac2 varvar v := { v with aa := () }.
Print varvar.

(* From #17764 *)
Module Point.
  Ltac2 Type t := { x : int ; y : int }.

  Ltac2 origin : t := { x := 0; y := 0; }.

End Point.

Ltac2 Eval { Point.origin with Point.y := 1; }.