File: ListNotationTests.v

package info (click to toggle)
coq-record-update 0.3.4-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 176 kB
  • sloc: makefile: 37; sed: 5
file content (27 lines) | stat: -rw-r--r-- 609 bytes parent folder | download | duplicates (3)
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
From RecordUpdate Require Import RecordSet.
Require Import List.

Import ListNotations.
Import RecordSetNotations.

Module GH4.

  Record foo := { a : bool ;
                  b : bool }.

  Global Instance etaX_RtlExprs : Settable _ :=
    settable!
            Build_foo <a; b>.


  Definition bar := {| a := true ; b := true |}.
  Definition baz := bar<|a := false|>.

End GH4.

Definition l := [1; 2; 3].
Record foo := { a : list nat;
                b : list bool; }.

#[export] Instance eta_foo : Settable _ := settable! Build_foo <a; b>.
Definition m_foo (x:foo) := x <| a := [1;2;3] |> <| b := [] |>.