Skip to content

Commit

Permalink
Merge pull request #31 from arthuraa/mathcomp-2.3.0-ci
Browse files Browse the repository at this point in the history
Mathcomp 2.3.0 ci
  • Loading branch information
arthuraa authored Dec 3, 2024
2 parents 5712f82 + 7142698 commit 9dcb5de
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 29 deletions.
12 changes: 12 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,17 @@ jobs:
- image: coqorg/coq:8.19
resource_class: 'large'

coq-8-19-mathcomp-2-3-0:
<<: *defaults
steps:
- startup
- prepare:
mathcomp-version: '2.3.0'
- build
docker:
- image: coqorg/coq:8.19
resource_class: 'large'

coq-8-19-mathcomp-dev:
<<: *defaults
steps:
Expand Down Expand Up @@ -131,5 +142,6 @@ workflows:
- coq-8-18-mathcomp-2-0-0
- coq-8-18-mathcomp-dev
- coq-8-19-mathcomp-2-2-0
- coq-8-19-mathcomp-2-3-0
- coq-8-19-mathcomp-dev
- coq-dev
15 changes: 11 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Use new display type for `orderType`, as in MathComp 2.3.0. The generated
instances now use the default display.

### Deprecated

### Removed

### Fixed

## [0.2.1] - 2024-12-02

### Changed

- Use new display type for `orderType`, as in MathComp 2.3.0. The generated
instances now use the default display.

### Fixed

- Simplify the type of derived isFinite instances to avoid a non-forgetful
inheritance warning.

Expand Down Expand Up @@ -48,7 +54,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- First version supporting inductive types.

[Unreleased]: https://github.com/arthuraa/deriving/compare/v0.2.0...HEAD
[Unreleased]: https://github.com/arthuraa/deriving/compare/v0.2.1...HEAD
[0.2.1]: https://github.com/arthuraa/deriving/releases/tag/v0.2.1
[0.2.0]: https://github.com/arthuraa/deriving/releases/tag/v0.2.0
[0.1.1]: https://github.com/arthuraa/deriving/releases/tag/v0.1.1
[0.1.0]: https://github.com/arthuraa/deriving/releases/tag/v0.1.0
Expand Down
2 changes: 1 addition & 1 deletion CoqMakefile.local
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TESTVOFILES=$(TESTVFILES:.v=.vo)
UNFOLDFILES = theories/ind.v theories/base.v

theories/tactics.v: make_tactics.ml $(UNFOLDFILES)
ocaml str.cma make_tactics.ml $(UNFOLDFILES) > theories/tactics.v
ocaml -I +str str.cma make_tactics.ml $(UNFOLDFILES) > theories/tactics.v

test: $(TESTVOFILES)
.PHONY: test
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ In such cases, it is a good idea to keep the instance opaque (e.g. defined with

## Requirements

- Coq 8.17 -- 8.18
- Coq 8.17 -- 8.19

- `coq-mathcomp-ssreflect` 2.0.0
- `coq-mathcomp-ssreflect` 2.0.0 -- 2.3.0

## Installation

Expand Down
1 change: 1 addition & 0 deletions _CoqProject
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ theories/ind.v
theories/tactics.v
theories/infer.v
theories/instances.v
theories/compat.v
theories/deriving.v

theories/instances/eqtype.v
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system}; in rec {
packages = rec {
coq = pkgs.coq_8_17;
coqPackages = pkgs.coqPackages_8_17.overrideScope' (self: super:
coq = pkgs.coq_8_19;
coqPackages = pkgs.coqPackages_8_19.overrideScope (self: super:
{ mathcomp = super.mathcomp.override {
version = "2.0.0";
version = "2.2.0";
};
deriving = super.deriving.overrideAttrs {
version = "0.2.0";
version = "0.2.1";
src = ./.;
};
});
Expand Down
4 changes: 2 additions & 2 deletions tests/syntax.v
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ HB.instance Definition _ := expr_isCountable.
Definition val_isCountable :=
[derive isCountable for val].
HB.instance Definition _ := val_isCountable.
Definition expr_isOrder : Order.isOrder tt expr.
Definition expr_isOrder : Order.isOrder Order.default_display expr.
Proof. exact: [derive nored isOrder for expr]. Qed.
HB.instance Definition _ := expr_isOrder.
Definition val_isOrder : Order.isOrder tt val.
Definition val_isOrder : Order.isOrder Order.default_display val.
Proof. exact: [derive nored isOrder for val]. Qed.
HB.instance Definition _ := val_isOrder.
10 changes: 0 additions & 10 deletions theories/base.v
Original file line number Diff line number Diff line change
Expand Up @@ -1308,13 +1308,3 @@ Definition hnth1 m :=
Coercion hnth1 : hlist1 >-> Funclass.
#[global]
Hint Unfold hnth1 : deriving.

(* Compatibility layer for Order.disp_t introduced in MathComp 2.3 *)
(* TODO: remove when we drop the support for MathComp 2.2 *)
Module Order.
Import Order.
Definition disp_t : Set.
Proof. exact: disp_t || exact: unit. Defined.
Definition default_display : disp_t.
Proof. exact: tt || exact: Disp tt tt. Defined.
End Order.
18 changes: 18 additions & 0 deletions theories/compat.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
From HB Require Import structures.
From mathcomp Require Import
ssreflect ssrfun ssrbool ssrnat eqtype seq choice fintype order.

Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Set Primitive Projections.

(* Compatibility layer for Order.disp_t introduced in MathComp 2.3 *)
(* TODO: remove when we drop the support for MathComp 2.2 *)
Module Order.
Import Order.
Definition disp_t : Set.
Proof. exact: disp_t || exact: unit. Defined.
Definition default_display : disp_t.
Proof. exact: tt || exact: Disp tt tt. Defined.
End Order.
2 changes: 1 addition & 1 deletion theories/deriving.v
Original file line number Diff line number Diff line change
@@ -1 +1 @@
From deriving Require Export ind tactics infer instances.
From deriving Require Export ind tactics infer instances compat.
2 changes: 1 addition & 1 deletion theories/instances.v
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ From HB Require Import structures.
From mathcomp Require Import
ssreflect ssrfun ssrbool ssrnat eqtype seq choice fintype order.

From deriving Require Import base ind tactics infer.
From deriving Require Import base ind tactics infer compat.
From deriving.instances Require Export eqtype tree_of_ind fintype order.

From Coq Require Import ZArith NArith String Ascii.
Expand Down
2 changes: 1 addition & 1 deletion theories/instances/order.v
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From mathcomp Require Import
ssreflect ssrfun ssrbool ssrnat eqtype seq choice fintype order.

From deriving Require Import base ind tactics infer.
From deriving Require Import base ind tactics infer compat.

From Coq Require Import ZArith NArith String Ascii.

Expand Down

0 comments on commit 9dcb5de

Please sign in to comment.