Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt w.r.t. coq/coq#19995. #1133

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions template-coq/src/plugin_core.ml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ let quote_module ~(include_functor : bool) ~(include_submodule : bool) ~(include
let mp = Nametab.locate_module qualid in
let mb = Global.lookup_module mp in
let open Declarations in
let open Mod_declarations in
let rec aux mb mp =
let rec aux' mt mp =
match mt with
Expand All @@ -196,12 +197,12 @@ let quote_module ~(include_functor : bool) ~(include_submodule : bool) ~(include
| SFBconst _ -> [GlobRef.ConstRef (Constant.make2 mp label)]
| SFBmind _ -> [GlobRef.IndRef (MutInd.make2 mp label, 0)]
| SFBrules _ -> failwith "Rewrite rules are not supported by TemplateCoq"
| SFBmodule mb -> if include_submodule then aux mb.mod_type mb.mod_mp else []
| SFBmodtype mtb -> if include_submodtype then aux mtb.mod_type mtb.mod_mp else []
| SFBmodule mb -> if include_submodule then aux (mod_type mb) (mod_mp mb) else []
| SFBmodtype mtb -> if include_submodtype then aux (mod_type mtb) (mod_mp mtb) else []
in
CList.map_append get_ref body
in aux' mb mp
in aux mb.mod_type mb.mod_mp
in aux (mod_type mb) (mod_mp mb)

let tmQuoteModule (qualid : qualid) : global_reference list tm =
fun ~st env evd success _fail ->
Expand Down
Loading