Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compatibility with Coq 8.17 and 8.18 #230

Merged
merged 2 commits into from
Jan 28, 2024
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
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- master
pull_request:
branches:
- '**'
- "**"

jobs:
build:
Expand All @@ -18,15 +18,21 @@ jobs:
ocaml-version:
- 4.12.0
coq-version:
- 8.13.1
- 8.13.2
- 8.14.1
- 8.15.2
- 8.16.1
- 8.17.1
- 8.18.0

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: 'true'
fetch-depth: 2 # for the code coverage tool
submodules: "true"

- name: Use OCaml ${{ matrix.ocaml-version }}
uses: avsm/setup-ocaml@v1
Expand Down
20 changes: 10 additions & 10 deletions proofs/Basics.v
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Definition try_with {A : Set} (e : unit -> A) (_with : extensible_type -> A)
Module Unit.
Definition lt (x y : unit) : Prop := False.

Instance strict_order : StrictOrder lt.
Global Instance strict_order : StrictOrder lt.
refine {|
StrictOrder_Irreflexive := _;
StrictOrder_Transitive := _ |}.
Expand All @@ -133,7 +133,7 @@ Module Unit.
exact Rxy.
Qed.

Instance order_dec : OrderDec strict_order.
Global Instance order_dec : OrderDec strict_order.
refine {|
compare := fun x y => Eq;
compare_is_sound := fun x y => CompEq _ _ _ |}.
Expand All @@ -145,7 +145,7 @@ Module Bool.
Inductive lt : bool -> bool -> Prop :=
| lt_intro : lt false true.

Instance strict_order : StrictOrder lt.
Global Instance strict_order : StrictOrder lt.
refine {|
StrictOrder_Irreflexive := _;
StrictOrder_Transitive := _ |}.
Expand All @@ -156,7 +156,7 @@ Module Bool.
constructor.
Qed.

Instance order_dec : OrderDec strict_order.
Global Instance order_dec : OrderDec strict_order.
refine {|
compare := fun x y =>
match (x, y) with
Expand All @@ -172,9 +172,9 @@ Module Bool.
End Bool.

Module Z.
Instance eq_dec : EqDec (eq_setoid Z) := Z.eq_dec.
Global Instance eq_dec : EqDec (eq_setoid Z) := Z.eq_dec.

Instance order_dec : OrderDec Z.lt_strorder := {|
Global Instance order_dec : OrderDec Z.lt_strorder := {|
compare := Z.compare;
compare_is_sound := Z.compare_spec |}.
End Z.
Expand Down Expand Up @@ -307,13 +307,13 @@ Module Char.
Qed.
End Lt.

Instance strict_order : StrictOrder Lt.t :=
Global Instance strict_order : StrictOrder Lt.t :=
{|
StrictOrder_Irreflexive := Lt.irreflexivity;
StrictOrder_Transitive := Lt.transitivity;
|}.

Instance order_dec : OrderDec strict_order.
Global Instance order_dec : OrderDec strict_order.
refine {|
compare := fun c1 c2 => (N_of_ascii c1 ?= N_of_ascii c2) % N;
compare_is_sound := fun c1 c2 => _;
Expand Down Expand Up @@ -480,12 +480,12 @@ Module String.
now rewrite (proj2 (N.ltb_lt _ _) H_gt_c1c2).
Qed.

Instance strict_order : StrictOrder Lt.t := {|
Global Instance strict_order : StrictOrder Lt.t := {|
StrictOrder_Irreflexive := Lt.irreflexivity;
StrictOrder_Transitive := Lt.transitivity;
|}.

Instance order_dec : OrderDec strict_order.
Global Instance order_dec : OrderDec strict_order.
refine {|
compare := fun s1 s2 =>
if String.eqb s1 s2 then
Expand Down
Loading