Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 0 additions & 54 deletions .github/workflows/nix-action-rocq-9.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5008,60 +5008,6 @@ jobs:
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
"rocq-9.1" --argstr job "stdlib-refman-html"
stdlib-warnings:
needs: []
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{
github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha
}}\" >> $GITHUB_ENV\nfi\n"
- name: Git checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ env.target_commit }}
- name: Determine which commit to test
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{
github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{ github.event.repository.html_url
}} refs/pull/${{ github.event.number }}/merge | cut -f1)\n mergeable=$(git
merge --no-commit --no-ff ${{ github.event.pull_request.base.sha }} > /dev/null
2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n if [ -z \"$merge_commit\"\
\ -o \"x$mergeable\" != \"x0\" ]; then\n echo \"tested_commit=${{ github.event.pull_request.head.sha
}}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\
\ fi\nfi\n"
- name: Git checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup coq
uses: cachix/cachix-action@v16
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq-community, math-comp
name: coq
- id: stepGetDerivation
name: Getting derivation for current job (stdlib-warnings)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"rocq-9.1\" --argstr job \"stdlib-warnings\" \\\n --dry-run 2> err > out
|| (touch fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting
derivation failed\"; exit 1; fi\n"
- id: stepCheck
name: Checking presence of CI target for current job
run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs
actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\
) ; then\n echo \"waiting a bit for derivations that should be in cache\"\
\n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
- if: steps.stepCheck.outputs.status != 'fetched'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
"rocq-9.1" --argstr job "stdlib-warnings"
stdpp:
needs:
- coq
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/nix-action-rocq-9.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4827,6 +4827,60 @@ jobs:
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
"rocq-9.2" --argstr job "stdlib-refman-html"
stdlib-warnings:
needs: []
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{
github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha
}}\" >> $GITHUB_ENV\nfi\n"
- name: Git checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ env.target_commit }}
- name: Determine which commit to test
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{
github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{ github.event.repository.html_url
}} refs/pull/${{ github.event.number }}/merge | cut -f1)\n mergeable=$(git
merge --no-commit --no-ff ${{ github.event.pull_request.base.sha }} > /dev/null
2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n if [ -z \"$merge_commit\"\
\ -o \"x$mergeable\" != \"x0\" ]; then\n echo \"tested_commit=${{ github.event.pull_request.head.sha
}}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\
\ fi\nfi\n"
- name: Git checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup coq
uses: cachix/cachix-action@v16
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq-community, math-comp
name: coq
- id: stepGetDerivation
name: Getting derivation for current job (stdlib-warnings)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"rocq-9.2\" --argstr job \"stdlib-warnings\" \\\n --dry-run 2> err > out
|| (touch fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting
derivation failed\"; exit 1; fi\n"
- id: stepCheck
name: Checking presence of CI target for current job
run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs
actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\
) ; then\n echo \"waiting a bit for derivations that should be in cache\"\
\n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
- if: steps.stepCheck.outputs.status != 'fetched'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
"rocq-9.2" --argstr job "stdlib-warnings"
stdpp:
needs:
- coq
Expand Down
4 changes: 2 additions & 2 deletions .nix/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ with builtins; with (import <nixpkgs> {}).lib;
}; };
"rocq-9.2" = { rocqPackages = common-bundles // {
rocq-core.override.version = "9.2";
# check that we compile without warnings on last release of Rocq
stdlib-warnings.job = true;
# plugin pins, from v9.2 branch of Rocq
bignums.override.version = "30a45625546da0a88db8689a8009d580aa3f557f";
stdlib-test.job = false;
Expand Down Expand Up @@ -319,8 +321,6 @@ with builtins; with (import <nixpkgs> {}).lib;
{ name = p; value.job = false; })); };
"rocq-9.1" = { rocqPackages = common-bundles // {
rocq-core.override.version = "9.1";
# check that we compile without warnings on last release of Rocq
stdlib-warnings.job = true;
# plugin pins, from v9.1 branch of Rocq
bignums.override.version = "9f9855536bd4167af6986f826819e32354b7da22";
stdlib-test.job = false;
Expand Down
43 changes: 43 additions & 0 deletions doc/changelog/01-changed/235-warning-92.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
- in `RelationPairs.v`

+ changed notations `_ @@1` and `_ @@2` from level 30 to level 1
(`#235 <https://github.com/coq/stdlib/pull/235>`_,
by Pierre Roux).

- in `FMapAVL.v`

+ changed notations `_ #1`, `_ #2`, `_ #l`, `_ #o` and `_ #r` from level 9 to level 1
(`#235 <https://github.com/coq/stdlib/pull/235>`_,
by Pierre Roux).

+ changed notation `<< _ , _ , _ >>` from level 9 to level 0
(`#235 <https://github.com/coq/stdlib/pull/235>`_,
by Pierre Roux).

- in `MSetAVL.v`

+ changed notations `_ #1`, `_ #2`, `_ #l`, `_ #b` and `_ #r` from level 9 to level 1
(`#235 <https://github.com/coq/stdlib/pull/235>`_,
by Pierre Roux).

+ changed notation `<< _ , _ , _ >>` from level 9 to level 0
(`#235 <https://github.com/coq/stdlib/pull/235>`_,
by Pierre Roux).

- in `ZNatPairs.v`

+ changed notations `_ #1` and `_ #2` from level 9 to level 1
(`#235 <https://github.com/coq/stdlib/pull/235>`_,
by Pierre Roux).

- in `NZBits.v`

+ changed notation `_ .[ _ ]` from level 5 to level 1
(`#235 <https://github.com/coq/stdlib/pull/235>`_,
by Pierre Roux).

- in `NZDomain.v`

+ changed notation `[ _ ]` from level 7 to level 0
(`#235 <https://github.com/coq/stdlib/pull/235>`_,
by Pierre Roux).
4 changes: 2 additions & 2 deletions theories/Classes/RelationPairs.v
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ Definition RelCompFun {A} {B : Type}(R:relation B)(f:A->B) : relation A :=

Infix "@@" := RelCompFun (at level 30, right associativity) : signature_scope.

Notation "R @@1" := (R @@ Fst)%signature (at level 30) : signature_scope.
Notation "R @@2" := (R @@ Snd)%signature (at level 30) : signature_scope.
Notation "R @@1" := (R @@ Fst)%signature (at level 1) : signature_scope.
Notation "R @@2" := (R @@ Snd)%signature (at level 1) : signature_scope.

(** We declare measures to the system using the [Measure] class.
Otherwise the instances would easily introduce loops,
Expand Down
14 changes: 7 additions & 7 deletions theories/FSets/FMapAVL.v
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Unset Strict Implicit.
(** Notations and helper lemma about pairs *)

Declare Scope pair_scope.
Notation "s #1" := (fst s) (at level 9, format "s '#1'") : pair_scope.
Notation "s #2" := (snd s) (at level 9, format "s '#2'") : pair_scope.
Notation "s #1" := (fst s) (at level 1, format "s '#1'") : pair_scope.
Notation "s #2" := (snd s) (at level 1, format "s '#2'") : pair_scope.

(** * The Raw functor

Expand Down Expand Up @@ -241,7 +241,7 @@ Fixpoint join l : key -> elt -> t -> t :=
*)

Record triple := mktriple { t_left:t; t_opt:option elt; t_right:t }.
Notation "<< l , b , r >>" := (mktriple l b r) (at level 9).
Notation "<< l , b , r >>" := (mktriple l b r) (at level 0).

Fixpoint split x m : triple := match m with
| Leaf => << Leaf, None, Leaf >>
Expand Down Expand Up @@ -343,10 +343,10 @@ Notation t := tree.
Arguments Leaf : clear implicits.
Arguments Node [elt].

Notation "<< l , b , r >>" := (mktriple l b r) (at level 9).
Notation "t #l" := (t_left t) (at level 9, format "t '#l'").
Notation "t #o" := (t_opt t) (at level 9, format "t '#o'").
Notation "t #r" := (t_right t) (at level 9, format "t '#r'").
Notation "<< l , b , r >>" := (mktriple l b r) (at level 0).
Notation "t #l" := (t_left t) (at level 1, format "t '#l'").
Notation "t #o" := (t_opt t) (at level 1, format "t '#o'").
Notation "t #r" := (t_right t) (at level 1, format "t '#r'").


(** * Map *)
Expand Down
12 changes: 6 additions & 6 deletions theories/MSets/MSetAVL.v
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ Definition concat s1 s2 :=
*)

Record triple := mktriple { t_left:t; t_in:bool; t_right:t }.
Notation "<< l , b , r >>" := (mktriple l b r) (at level 9).
Notation "<< l , b , r >>" := (mktriple l b r) (at level 0).

Fixpoint split x s : triple := match s with
| Leaf => << Leaf, false, Leaf >>
Expand Down Expand Up @@ -530,11 +530,11 @@ Qed.

Declare Scope pair_scope.

Notation "s #1" := (fst s) (at level 9, format "s '#1'") : pair_scope.
Notation "s #2" := (snd s) (at level 9, format "s '#2'") : pair_scope.
Notation "t #l" := (t_left t) (at level 9, format "t '#l'") : pair_scope.
Notation "t #b" := (t_in t) (at level 9, format "t '#b'") : pair_scope.
Notation "t #r" := (t_right t) (at level 9, format "t '#r'") : pair_scope.
Notation "s #1" := (fst s) (at level 1, format "s '#1'") : pair_scope.
Notation "s #2" := (snd s) (at level 1, format "s '#2'") : pair_scope.
Notation "t #l" := (t_left t) (at level 1, format "t '#l'") : pair_scope.
Notation "t #b" := (t_in t) (at level 1, format "t '#b'") : pair_scope.
Notation "t #r" := (t_right t) (at level 1, format "t '#r'") : pair_scope.

#[local] Open Scope pair_scope.

Expand Down
4 changes: 2 additions & 2 deletions theories/Numbers/Integer/NatPairs/ZNatPairs.v
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ From Stdlib Require Export Ring.
Declare Scope pair_scope.
#[local] Open Scope pair_scope.

Notation "s #1" := (fst s) (at level 9, format "s '#1'") : pair_scope.
Notation "s #2" := (snd s) (at level 9, format "s '#2'") : pair_scope.
Notation "s #1" := (fst s) (at level 1, format "s '#1'") : pair_scope.
Notation "s #2" := (snd s) (at level 1, format "s '#2'") : pair_scope.

Module ZPairsAxiomsMod (Import N : NAxiomsMiniSig) <: ZAxiomsMiniSig.
Module Import NProp.
Expand Down
2 changes: 1 addition & 1 deletion theories/Numbers/NatInt/NZBits.v
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Module Type Bits (Import A : Typ).
End Bits.

Module Type BitsNotation (Import A : Typ)(Import B : Bits A).
Notation "a .[ n ]" := (testbit a n) (at level 5, format "a .[ n ]").
Notation "a .[ n ]" := (testbit a n) (at level 1, format "a .[ n ]").
Infix ">>" := shiftr (at level 30, no associativity).
Infix "<<" := shiftl (at level 30, no associativity).
End BitsNotation.
Expand Down
2 changes: 1 addition & 1 deletion theories/Numbers/NatInt/NZDomain.v
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ Definition ofnat (n : nat) : t := (S^n) 0.

Declare Scope ofnat.
#[local] Open Scope ofnat.
Notation "[ n ]" := (ofnat n) (at level 7) : ofnat.
Notation "[ n ]" := (ofnat n) (at level 0) : ofnat.

Lemma ofnat_zero : [O] == 0.
Proof.
Expand Down
5 changes: 5 additions & 0 deletions theories/_CoqProject
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
-R . Stdlib
# When editing below lines, keep the theories/dune file in sync
# to handle when requiring Rocq >= 9.2
-arg -w -arg -notation-for-abbreviation
-arg -w -arg -ltac2-notation-for-abbreviation
-arg -w -arg -implicit-create-hint-db
-arg -w -arg -implicit-create-rewrite-hint-db
-arg -w -arg -register-all
-arg -w -arg -scheme-rewriting
2 changes: 1 addition & 1 deletion theories/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
(dev
(coq
;; see theories/_CoqProject for details
(flags :standard -w -notation-for-abbreviation -w -ltac2-notation-for-abbreviation))))
(flags :standard -w -notation-for-abbreviation -w -ltac2-notation-for-abbreviation -w -implicit-create-hint-db -w -implicit-create-rewrite-hint-db -w -register-all -w -scheme-rewriting))))

(rule
(targets All.v)
Expand Down