@@ -46,12 +46,6 @@ Cumulative Inductive TemplateMonad@{t u} : Type@{t} -> Prop :=
4646| tmCurrentModPath : unit -> TemplateMonad modpath
4747
4848(* Quoting and unquoting commands *)
49- (* Similar to MetaRocq Quote Definition ... := ... *)
50- | tmQuote : forall {A:Type@{t}}, A -> TemplateMonad Ast.term
51- (* Similar to MetaRocq Quote Recursively Definition but takes a boolean "bypass opacity" flag.
52- ([true] - quote bodies of all dependencies (transparent and opaque);
53- [false] -quote bodies of transparent definitions only) *)
54- | tmQuoteRecTransp : forall {A:Type@{t}}, A -> bool(* bypass opacity? *) -> TemplateMonad program
5549(* Quote the body of a definition or inductive. Its name need not be fully qualified *)
5650| tmQuoteInductive : kername -> TemplateMonad mutual_inductive_body
5751| tmQuoteUniverses : TemplateMonad ConstraintSet.t
@@ -70,6 +64,20 @@ Cumulative Inductive TemplateMonad@{t u} : Type@{t} -> Prop :=
7064| tmInferInstance : option reductionStrategy -> forall A : Type@{t}, TemplateMonad (option_instance A)
7165.
7266
67+ (* Moving outside of the inductive definition only to make it sort polymorphic but
68+ avoid having to update all of the TemplateMonad definition to be sort poylmorphic *)
69+ (* Similar to MetaRocq Quote Definition ... := ... *)
70+ Polymorphic Axiom tmQuote@{s; t u}
71+ : forall {A : Type@{s;t}}, A -> TemplateMonad@{t u} Ast.term.
72+
73+ (* Moving outside of the inductive definition only to make it sort polymorphic but
74+ avoid having to update all of the TemplateMonad definition to be sort poylmorphic *)
75+ (* Similar to MetaRocq Quote Recursively Definition but takes a boolean "bypass opacity" flag.
76+ ([true] - quote bodies of all dependencies (transparent and opaque);
77+ [false] -quote bodies of transparent definitions only) *)
78+ Polymorphic Axiom tmQuoteRecTransp@{s; t u}
79+ : forall {A : Type@{s;t}}, A -> bool(* bypass opacity? *) -> TemplateMonad@{t u} program.
80+
7381(** This version of [tmBind] flattens nesting structure; using it in deeply recursive template programs can speed things up drastically *)
7482(** We use [tmBind] in the recursive position to avoid quadratic blowup in the number of [tmOptimizedBind]s *)
7583Fixpoint tmOptimizedBind@{t u} {A B : Type @{t}} (v : TemplateMonad@{t u} A) : (A -> TemplateMonad@{t u} B) -> TemplateMonad@{t u} B
0 commit comments