Skip to content

Commit 3562200

Browse files
authored
Merge pull request #131 from ppedrot/module-abstract-type
Adapt w.r.t. coq/coq#19995.
2 parents 32609ca + 5aefae6 commit 3562200

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/declare_translation.ml

+7-7
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ and id_of_module_path mp =
215215
and declare_module ~opaque_access ?(continuation = ignore) ?name arity mb =
216216
debug_string [`Module] "--> declare_module";
217217
let open Declarations in
218-
let mp = mb.mod_mp in
219-
match Declareops.mod_expr mb, mb.mod_type with
218+
let mp = Mod_declarations.mod_mp mb in
219+
match Mod_declarations.mod_expr mb, Mod_declarations.mod_type mb with
220220
| Algebraic _, NoFunctor fields
221221
| FullStruct, NoFunctor fields ->
222222
let id = id_of_module_path mp in
@@ -230,7 +230,7 @@ and declare_module ~opaque_access ?(continuation = ignore) ?name arity mb =
230230
ignore (Declaremods.end_module ()); continuation ())
231231
(fun continuation -> function
232232
| (lab, SFBconst cb) when (match cb.const_body with OpaqueDef _ -> false | Undef _ -> true | _ -> false) ->
233-
let cst = Mod_subst.constant_of_delta_kn mb.mod_delta (Names.KerName.make mp lab) in
233+
let cst = Mod_subst.constant_of_delta_kn (Mod_declarations.mod_delta mb) (Names.KerName.make mp lab) in
234234
if try ignore (Relations.get_constant arity cst); true with Not_found -> false then
235235
continuation ()
236236
else
@@ -254,7 +254,7 @@ and declare_module ~opaque_access ?(continuation = ignore) ?name arity mb =
254254
let poly = Declareops.constant_is_polymorphic cb in
255255
let scope = Locality.(Global ImportDefaultBehavior) in
256256
let kind = Decls.(IsDefinition Definition) in
257-
let cst = Mod_subst.constant_of_delta_kn mb.mod_delta (Names.KerName.make mp lab) in
257+
let cst = Mod_subst.constant_of_delta_kn (Mod_declarations.mod_delta mb) (Names.KerName.make mp lab) in
258258
if try ignore (Relations.get_constant arity cst); true with Not_found -> false then
259259
continuation ()
260260
else
@@ -279,7 +279,7 @@ and declare_module ~opaque_access ?(continuation = ignore) ?name arity mb =
279279
let env = Global.env () in
280280
let evd = Evd.from_env env in
281281
let evdr = ref evd in
282-
let mut_ind = Mod_subst.mind_of_delta_kn mb.mod_delta (Names.KerName.make mp lab) in
282+
let mut_ind = Mod_subst.mind_of_delta_kn (Mod_declarations.mod_delta mb) (Names.KerName.make mp lab) in
283283
let ind = (mut_ind, 0) in
284284
if try ignore (Relations.get_inductive arity ind); true with Not_found -> false then
285285
continuation ()
@@ -298,8 +298,8 @@ and declare_module ~opaque_access ?(continuation = ignore) ?name arity mb =
298298
declare_inductive ~opaque_access ind_name ~continuation arity evdr env pind
299299
end
300300
| (lab, SFBmodule mb') when
301-
match mb'.mod_type with NoFunctor _ ->
302-
(match Declareops.mod_expr mb' with FullStruct | Algebraic _ -> true | _ -> false)
301+
match Mod_declarations.mod_type mb' with NoFunctor _ ->
302+
(match Mod_declarations.mod_expr mb' with FullStruct | Algebraic _ -> true | _ -> false)
303303
| _ -> false
304304
->
305305
declare_module ~opaque_access ~continuation arity mb'

0 commit comments

Comments
 (0)