fact: Definition with_goal_type (F : forall (T : Type), ttac T) : tactic := fun g => match g with | Metavar Propₛ G g => '(m: x, gs) <- F G; M.inst_cumul_or_fail UniCoq x g;; M.map (fun g => M.ret (m:tt,g)) gs | Metavar Typeₛ G g => gP <- evar Prop; mtry inst_cumul_or_fail UniMatch gP G;; '(m: x, gs) <- F G; M.inst_cumul_or_fail UniCoq x g;; M.map (fun g => M.ret (m:tt,g)) gs with _ => raise CantCoerce end end.
imports: Mtac2(Base Datatypes List Sorts tactics.Tactics) Strings.String Strings.String