From b23c3fee91e146d4aa2bc2c75ea30619a204c3d9 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Fri, 12 Oct 2018 20:02:57 +0200 Subject: Adding a new kind of assumption to track assumption coming from "Context". This is to avoid depending on the combination "Discharge" + no opened section to trigger an automatic declaration of instance. --- library/decl_kinds.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'library') diff --git a/library/decl_kinds.ml b/library/decl_kinds.ml index 8d5c2fb687..8decdbea1e 100644 --- a/library/decl_kinds.ml +++ b/library/decl_kinds.ml @@ -46,7 +46,7 @@ type definition_object_kind = | Method | Let -type assumption_object_kind = Definitional | Logical | Conjectural +type assumption_object_kind = Definitional | Logical | Conjectural | Context (* [assumption_kind] -- cgit v1.2.3 From 398fe8ee23759a1c28d91204aa013beae1dc602b Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Fri, 12 Oct 2018 18:25:18 +0200 Subject: Cleaning the status of Local Definition and similar. Formerly, knowing if a declaration was to be discharged, to be global but invisible at import, or to be global but visible at import was obtained by combining the parser-level information (i.e. use of Variable/Hypothesis/Let vs use of Axiom/Parameter/Definition/..., use of Local vs Global) with the result of testing whether there were open sections. We change the meaning of the Discharge flag: it does not tell anymore that it was syntactically a Variable/Hypothesis/Let, but tells the expected semantics of the declaration (issuing a warning in the parser-to-interpreter step if the semantics is not the one suggested by the syntax). In particular, the interpretation/command engine becomes independent of the parser. The new "semantic" type is: type import_status = ImportDefaultBehavior | ImportNeedQualified type locality = Discharge | Global of import_status In the process, we found a couple of inconsistencies in the treatment of the locality status. See bug #8722 and test file LocalDefinition.v. --- library/decl_kinds.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'library') diff --git a/library/decl_kinds.ml b/library/decl_kinds.ml index 8decdbea1e..39042e1ab7 100644 --- a/library/decl_kinds.ml +++ b/library/decl_kinds.ml @@ -12,7 +12,9 @@ type discharge = DoDischarge | NoDischarge -type locality = Discharge | Local | Global +type import_status = ImportDefaultBehavior | ImportNeedQualified + +type locality = Discharge | Global of import_status type binding_kind = Explicit | Implicit -- cgit v1.2.3