aboutsummaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2016-05-11 19:10:04 +0200
committerPierre-Marie Pédrot2016-05-11 19:10:04 +0200
commit4d9bcbda2fbf09939cddff4e4b42e5397d8a5cf1 (patch)
treec41decbdd8bb9eb81c076cdea6d1c64bbcb0ff94 /dev
parent6be542f4ccb1d7fe95a65f4600f202a2424370d9 (diff)
parent9acfdfd9b7d1cae34b97a4c06c52c4646e15589b (diff)
Thorough rewriting of the Pcoq API towards safety and static invariants.
Amongst other things: 1. No more unsafe grammar extensions, except when going through the CAMLPX-based Pcoq.Gram module. This is mostly safe because CAMLPX adds casts to ensure that parsing rules are well-typed. In particular, constr notation is now based on GADTs ensuring well-typedness. 2. Less reliance on unsafe coq inside Pcoq, and exposing a self-contained API. The Entry module was also removed as it now results useless. 3. Purely functional API for synchronized grammar extension. This gets rid of quite buggy code maintaining a table of empty entries to work around CAMLPX bugs. The state modification is now explicit and grammar extensions synchronized with the summary must provide the rules they want to perform instead of doing so imperatively.
Diffstat (limited to 'dev')
-rw-r--r--dev/printers.mllib1
-rw-r--r--dev/top_printers.ml4
2 files changed, 2 insertions, 3 deletions
diff --git a/dev/printers.mllib b/dev/printers.mllib
index 390a9f384d..aa74cb5085 100644
--- a/dev/printers.mllib
+++ b/dev/printers.mllib
@@ -194,7 +194,6 @@ Proof_global
Pfedit
Decl_mode
Ppconstr
-Entry
Pcoq
Printer
Pptactic
diff --git a/dev/top_printers.ml b/dev/top_printers.ml
index f9c1971a82..f5599d793f 100644
--- a/dev/top_printers.ml
+++ b/dev/top_printers.ml
@@ -520,7 +520,7 @@ let _ =
extend_vernac_command_grammar ("PrintConstr", 0) None
[GramTerminal "PrintConstr";
GramNonTerminal
- (Loc.ghost,rawwit wit_constr,Extend.Aentry (Pcoq.name_of_entry Pcoq.Constr.constr))]
+ (Loc.ghost,rawwit wit_constr,Extend.Aentry Pcoq.Constr.constr)]
let _ =
try
@@ -536,7 +536,7 @@ let _ =
extend_vernac_command_grammar ("PrintPureConstr", 0) None
[GramTerminal "PrintPureConstr";
GramNonTerminal
- (Loc.ghost,rawwit wit_constr,Extend.Aentry (Pcoq.name_of_entry Pcoq.Constr.constr))]
+ (Loc.ghost,rawwit wit_constr,Extend.Aentry Pcoq.Constr.constr)]
(* Setting printer of unbound global reference *)
open Names