aboutsummaryrefslogtreecommitdiffhomepage
path: root/checker
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-02-26 18:52:05 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-02-26 18:52:05 +0000
commit7dd28b4772251af6ae3641ec63a8251153915e21 (patch)
treed11220b4ff19473215d77e9738d2a4eb58bf681d /checker
parent2b09b02c136d3d68fa19e4493d5b5ad28c4f16db (diff)
Names: shortcuts for building {kn, constant, mind} with empty sections
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16249 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'checker')
-rw-r--r--checker/mod_checking.ml4
-rw-r--r--checker/modops.ml8
-rw-r--r--checker/subtyping.ml4
3 files changed, 8 insertions, 8 deletions
diff --git a/checker/mod_checking.ml b/checker/mod_checking.ml
index 169fa5ca8..bc4ea7c69 100644
--- a/checker/mod_checking.ml
+++ b/checker/mod_checking.ml
@@ -258,10 +258,10 @@ and check_module env mp mb =
and check_structure_field env mp lab res = function
| SFBconst cb ->
- let c = make_con mp DirPath.empty lab in
+ let c = Constant.make2 mp lab in
check_constant_declaration env c cb
| SFBmind mib ->
- let kn = make_mind mp DirPath.empty lab in
+ let kn = MutInd.make2 mp lab in
let kn = mind_of_delta res kn in
Indtypes.check_inductive env kn mib
| SFBmodule msb ->
diff --git a/checker/modops.ml b/checker/modops.ml
index 38cd09956..13e436a5e 100644
--- a/checker/modops.ml
+++ b/checker/modops.ml
@@ -67,9 +67,9 @@ let module_body_of_type mp mtb =
let rec add_signature mp sign resolver env =
let add_one env (l,elem) =
- let kn = make_kn mp DirPath.empty l in
- let con = constant_of_kn kn in
- let mind = mind_of_delta resolver (mind_of_kn kn) in
+ let kn = KerName.make2 mp l in
+ let con = Constant.make1 kn in
+ let mind = mind_of_delta resolver (MutInd.make1 kn) in
match elem with
| SFBconst cb ->
(* let con = constant_of_delta resolver con in*)
@@ -97,7 +97,7 @@ let strengthen_const mp_from l cb resolver =
match cb.const_body with
| Def _ -> cb
| _ ->
- let con = make_con mp_from DirPath.empty l in
+ let con = Constant.make2 mp_from l in
(* let con = constant_of_delta resolver con in*)
{ cb with const_body = Def (Declarations.from_val (Const con)) }
diff --git a/checker/subtyping.ml b/checker/subtyping.ml
index 02006a7ac..d0d18c68c 100644
--- a/checker/subtyping.ml
+++ b/checker/subtyping.ml
@@ -35,7 +35,7 @@ type namedmodule =
constructors *)
let add_mib_nameobjects mp l mib map =
- let ind = make_mind mp DirPath.empty l in
+ let ind = MutInd.make2 mp l in
let add_mip_nameobjects j oib map =
let ip = (ind,j) in
let map =
@@ -83,7 +83,7 @@ let check_conv_error error f env a1 a2 =
(* for now we do not allow reorderings *)
let check_inductive env mp1 l info1 mib2 spec2 subst1 subst2=
- let kn = make_mind mp1 DirPath.empty l in
+ let kn = MutInd.make2 mp1 l in
let error () = error_not_match l spec2 in
let check_conv f = check_conv_error error f in
let mib1 =