aboutsummaryrefslogtreecommitdiffstats
path: root/src/versions
diff options
context:
space:
mode:
authorChantal Keller <Chantal.Keller@lri.fr>2016-04-30 19:54:54 +0200
committerChantal Keller <Chantal.Keller@lri.fr>2016-04-30 19:54:54 +0200
commit1aa3a9cb2171de7a68d00fb4c30b81c8d2689979 (patch)
tree895f4e4beeca932cec9a8cdc8c143969bf247831 /src/versions
parent4d4fb31bce09141b9c164415c2e8d9d720b971e1 (diff)
downloadsmtcoq-1aa3a9cb2171de7a68d00fb4c30b81c8d2689979.tar.gz
smtcoq-1aa3a9cb2171de7a68d00fb4c30b81c8d2689979.zip
Bring back the nice printing of automatically generated theorems
Diffstat (limited to 'src/versions')
-rw-r--r--src/versions/native/structures.ml9
-rw-r--r--src/versions/standard/structures.ml16
2 files changed, 23 insertions, 2 deletions
diff --git a/src/versions/native/structures.ml b/src/versions/native/structures.ml
index 6eb1991..51e14d6 100644
--- a/src/versions/native/structures.ml
+++ b/src/versions/native/structures.ml
@@ -45,13 +45,20 @@ type names_id_t = Names.identifier
let dummy_loc = Pp.dummy_loc
-let mkConst c =
+let mkUConst c =
{ const_entry_body = c;
const_entry_type = None;
const_entry_secctx = None;
const_entry_opaque = false;
const_entry_inline_code = false}
+let mkTConst c ty =
+ { const_entry_body = c;
+ const_entry_type = Some ty;
+ const_entry_secctx = None;
+ const_entry_opaque = false;
+ const_entry_inline_code = false}
+
let error = Errors.error
let coqtype = lazy Term.mkSet
diff --git a/src/versions/standard/structures.ml b/src/versions/standard/structures.ml
index 74c484a..26a8cc1 100644
--- a/src/versions/standard/structures.ml
+++ b/src/versions/standard/structures.ml
@@ -68,7 +68,7 @@ type names_id_t = Names.Id.t
let dummy_loc = Loc.ghost
-let mkConst c =
+let mkUConst c =
let env = Global.env () in
let evd = Evd.from_env env in
let evd, ty = Typing.type_of env evd c in
@@ -82,6 +82,20 @@ let mkConst c =
const_entry_opaque = false;
const_entry_inline_code = false }
+let mkTConst c ty =
+ let env = Global.env () in
+ let evd = Evd.from_env env in
+ let evd, _ = Typing.type_of env evd c in
+ { const_entry_body = Future.from_val ((c, Univ.ContextSet.empty),
+ Safe_typing.empty_private_constants);
+ const_entry_secctx = None;
+ const_entry_feedback = None;
+ const_entry_type = Some ty;
+ const_entry_polymorphic = false;
+ const_entry_universes = snd (Evd.universe_context evd);
+ const_entry_opaque = false;
+ const_entry_inline_code = false }
+
let error = Errors.error
let coqtype = Future.from_val Term.mkSet