-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add external Ltac2.Constr.equal_nounivs
We'll connect it up after doing a performance measurement
- Loading branch information
1 parent
abeddca
commit ed41cbb
Showing
20 changed files
with
125 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Require Import Ltac2.Ltac2. | ||
|
||
Declare ML Module "ltac2_extra". | ||
|
||
Module Ltac2. | ||
Module Constr. | ||
Export Ltac2.Constr. | ||
Ltac2 @ external equal_nounivs : constr -> constr -> bool := "ltac2" "constr_equal_nounivs". | ||
End Constr. | ||
End Ltac2. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Require Import Ltac2.Ltac2. | ||
|
||
Declare ML Module "coq-rewriter.ltac2_extra". | ||
|
||
Module Ltac2. | ||
Module Constr. | ||
Export Ltac2.Constr. | ||
Ltac2 @ external equal_nounivs : constr -> constr -> bool := "ltac2" "constr_equal_nounivs". | ||
End Constr. | ||
End Ltac2. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Require Import Ltac2.Ltac2. | ||
|
||
Declare ML Module "coq-rewriter.ltac2_extra". | ||
|
||
Module Ltac2. | ||
Module Constr. | ||
Export Ltac2.Constr. | ||
Ltac2 @ external equal_nounivs : constr -> constr -> bool := "ltac2" "constr_equal_nounivs". | ||
End Constr. | ||
End Ltac2. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
open Ltac2_plugin | ||
open Tac2ffi | ||
open Tac2expr | ||
open Proofview.Notations | ||
|
||
let pname s = { mltac_plugin = "coq-core.plugins.ltac2"; mltac_tactic = s } | ||
|
||
let define_primitive name arity f = | ||
Tac2env.define_primitive (pname name) (Tac2ffi.mk_closure arity f) | ||
|
||
let define2 name r0 r1 f = define_primitive name (arity_suc arity_one) begin fun x y -> | ||
f (Tac2ffi.repr_to r0 x) (Tac2ffi.repr_to r1 y) | ||
end | ||
|
||
let () = define2 "constr_equal_nounivs" constr constr begin fun c1 c2 -> | ||
Proofview.tclEVARMAP >>= fun sigma -> | ||
let b = EConstr.eq_constr_nounivs sigma c1 c2 in | ||
Proofview.tclUNIT (Tac2ffi.of_bool b) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
open Ltac2_plugin | ||
open Tac2ffi | ||
open Tac2expr | ||
open Proofview.Notations | ||
|
||
let pname s = { mltac_plugin = "coq-core.plugins.ltac2"; mltac_tactic = s } | ||
|
||
let define_primitive name arity f = | ||
Tac2env.define_primitive (pname name) (Tac2ffi.mk_closure arity f) | ||
|
||
let define2 name r0 r1 f = define_primitive name (arity_suc arity_one) begin fun x y -> | ||
f (Tac2ffi.repr_to r0 x) (Tac2ffi.repr_to r1 y) | ||
end | ||
|
||
let () = define2 "constr_equal_nounivs" constr constr begin fun c1 c2 -> | ||
Proofview.tclEVARMAP >>= fun sigma -> | ||
let b = EConstr.eq_constr_nounivs sigma c1 c2 in | ||
Proofview.tclUNIT (Tac2ffi.of_bool b) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
open Ltac2_plugin | ||
open Tac2ffi | ||
open Tac2expr | ||
open Proofview.Notations | ||
|
||
let pname s = { mltac_plugin = "coq-core.plugins.ltac2"; mltac_tactic = s } | ||
|
||
let define_primitive name arity f = | ||
Tac2env.define_primitive (pname name) (Tac2ffi.mk_closure arity f) | ||
|
||
let define2 name r0 r1 f = define_primitive name (arity_suc arity_one) begin fun x y -> | ||
f (Tac2ffi.repr_to r0 x) (Tac2ffi.repr_to r1 y) | ||
end | ||
|
||
let () = define2 "constr_equal_nounivs" constr constr begin fun c1 c2 -> | ||
Proofview.tclEVARMAP >>= fun sigma -> | ||
let b = EConstr.eq_constr_nounivs sigma c1 c2 in | ||
Proofview.tclUNIT (Tac2ffi.of_bool b) | ||
end |
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DECLARE PLUGIN "coq-rewriter.ltac2_extra" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DECLARE PLUGIN "coq-rewriter.ltac2_extra" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DECLARE PLUGIN "coq-rewriter.ltac2_extra" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Ltac2_extra | ||
Ltac2_extra_plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Ltac2_extra | ||
Ltac2_extra_plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Ltac2_extra | ||
Ltac2_extra_plugin |