Skip to content

Commit 0451f1b

Browse files
authored
Merge pull request #573 from LPCIC/fix-detype
fix detype
2 parents 75b6197 + ee76019 commit 0451f1b

File tree

12 files changed

+518
-148
lines changed

12 files changed

+518
-148
lines changed

.nix/coq-nix-toolbox.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"4e48948fa8252a2fc755182abdd4b199f4798724"
1+
"dd771a5001cd955514f2462cad7cdd90377530e3"

.nix/coq-overlays/coq-elpi/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ with builtins; with lib; let
1010
{ case = "8.16"; out = { version = "1.17.0"; };}
1111
{ case = "8.17"; out = { version = "1.17.0"; };}
1212
{ case = "8.18"; out = { version = "v1.18.1"; };}
13-
{ case = "8.19"; out = { version = "v1.18.1"; };}
13+
{ case = "8.19"; out = { version = "v1.18.2"; };}
1414
] {} );
1515
in mkCoqDerivation {
1616
pname = "elpi";

.ocamlformat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
m=120

Changelog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## [2.0.2] - 22/01/2024
4+
5+
Requires Elpi 1.18.1 and Coq 8.19.
6+
7+
### API
8+
- Fix `coq.elaborate-*` does not erase the type annotation of `Let`s (regression
9+
introduced in 2.0.1). This fix may introduce differences in generated names
10+
- Fix `coq.elaborate-*` are not affected anymore by printing options
11+
312
## [2.0.1] - 29/12/2023
413

514
Requires Elpi 1.18.1 and Coq 8.19.

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,6 @@ SPACE=$(XXX) $(YYY)
151151
apps/%.vo: force
152152
@$(MAKE) -C apps/$(word 1,$(subst /, ,$*)) \
153153
$(subst $(SPACE),/,$(wordlist 2,99,$(subst /, ,$*))).vo
154+
155+
nix:
156+
nix-shell --arg do-nothing true --run "updateNixToolBox & genNixActions"

apps/derive/tests/test_projK.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ Check eq_refl 0 : projEnvelope1 nat 1 1 (Envelope nat 0 1) = 0.
5959
Check projEnvelope2 : forall A, A -> A -> zeta A -> A.
6060
Check eq_refl 0 : projEnvelope2 nat 1 1 (Envelope nat 1 0) = 0.
6161
Check projRedex1 : forall A, A -> beta A -> A.
62-
Check projWhy1 : forall n : peano, match n with
62+
Check projWhy1 : forall n : peano, match n return Type with
6363
| Zero => peano
6464
| Succ _ => unit
6565
end -> iota -> peano.
66-
Check projWhy2 : forall n : peano, match n with
66+
Check projWhy2 : forall n : peano, match n return Type with
6767
| Zero => peano
6868
| Succ _ => unit
6969
end -> iota -> { i : peano & match i with Zero => peano | Succ _ => unit end }.

coq-elpi.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ install: [ make "install" "COQBIN=%{bin}%/" "ELPIDIR=%{prefix}%/lib/elpi" ]
1515
depends: [
1616
"ocaml" {>= "4.09.0" }
1717
"stdlib-shims"
18-
"elpi" {>= "1.18.1" & < "1.19.0~"}
18+
"elpi" {>= "1.18.2" & < "1.19.0~"}
1919
"coq" {>= "8.19" & < "8.20~" }
2020
"dot-merlin-reader" {with-dev}
2121
"ocaml-lsp-server" {with-dev}

src/coq_elpi_builtins_synterp.ml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ let scope = let open Conv in let open API.AlgebraicData in declare {
5353

5454
let grafting = let open Conv in let open API.AlgebraicData in declare {
5555
ty = TyName "grafting";
56-
doc = "Specify if the clause has to be grafted before or after a named clause";
56+
doc = "Specify if the clause has to be grafted before, grafted after or replace a named clause";
5757
pp = (fun fmt _ -> Format.fprintf fmt "<todo>");
5858
constructors = [
5959
K("before","",A(id,N),
@@ -62,10 +62,13 @@ let grafting = let open Conv in let open API.AlgebraicData in declare {
6262
K("after","",A(id,N),
6363
B (fun x -> (`After,x)),
6464
M (fun ~ok ~ko -> function (`After,x) -> ok x | _ -> ko ()));
65+
K("replace","",A(id,N),
66+
B (fun x -> (`Replace,x)),
67+
M (fun ~ok ~ko -> function (`Replace,x) -> ok x | _ -> ko ()));
6568
]
6669
} |> CConv.(!<)
6770

68-
type clause = string option * ([ `After | `Before ] * string) option * API.Data.term
71+
type clause = string option * ([ `After | `Before | `Replace ] * string) option * API.Data.term
6972

7073
let clause = let open Conv in let open API.AlgebraicData in declare {
7174
ty = TyName "clause";

src/coq_elpi_builtins_synterp.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ val set_accumulate_to_db_synterp :
5252
val prop : Data.term Conversion.t
5353
val id : string Conversion.t
5454

55-
type clause = string option * ([ `After | `Before ] * string) option * Data.term
55+
type clause = string option * ([ `After | `Before | `Replace ] * string) option * Data.term
5656

5757
val clause : clause Conversion.t
5858

5959
type scope = ExecutionSite | CurrentModule | Library
6060

6161
val scope : scope Conversion.t
62-
val grafting : ([ `After | `Before ] * string) Conversion.t
62+
val grafting : ([ `After | `Before | `Replace ] * string) Conversion.t
6363
val options : (Coq_elpi_HOAS.options, Data.constraints) ContextualConversion.ctx_readback
6464
val locate_module : BuiltIn.declaration
6565
val locate_module_type : BuiltIn.declaration

0 commit comments

Comments
 (0)