diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2016-09-26 00:06:16 +0200 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2016-09-26 00:11:01 +0200 |
commit | c8ca50f0cf961c9e31489f095463a99fc005c5de (patch) | |
tree | 4e5ab6c0aac4bf5c8db5604089297a74d34df3c1 | |
parent | 2fa1dc39371b8f770ce662d56d85bf6f20413aac (diff) |
Fix bug #5093: typeclasses eauto depth arg does not accept a var.
-rw-r--r-- | ltac/g_class.ml4 | 14 | ||||
-rw-r--r-- | test-suite/bugs/closed/5093.v | 11 |
2 files changed, 14 insertions, 11 deletions
diff --git a/ltac/g_class.ml4 b/ltac/g_class.ml4 index eaa6aad4f..18df596eb 100644 --- a/ltac/g_class.ml4 +++ b/ltac/g_class.ml4 @@ -44,18 +44,10 @@ ARGUMENT EXTEND debug TYPED AS bool PRINTED BY pr_debug | [ ] -> [ false ] END -let pr_depth _prc _prlc _prt = function - Some i -> Pp.int i - | None -> Pp.mt() - -ARGUMENT EXTEND depth TYPED AS int option PRINTED BY pr_depth - | [ int_or_var_opt(v) ] -> [ match v with Some (ArgArg i) -> Some i | _ -> None ] -END - (* true = All transparent, false = Opaque if possible *) VERNAC COMMAND EXTEND Typeclasses_Settings CLASSIFIED AS SIDEFF - | [ "Typeclasses" "eauto" ":=" debug(d) depth(depth) ] -> [ + | [ "Typeclasses" "eauto" ":=" debug(d) int_opt(depth) ] -> [ set_typeclasses_debug d; set_typeclasses_depth depth ] @@ -63,9 +55,9 @@ END (** Compatibility: typeclasses eauto has 8.5 and 8.6 modes *) TACTIC EXTEND typeclasses_eauto - | [ "typeclasses" "eauto" depth(d) "with" ne_preident_list(l) ] -> + | [ "typeclasses" "eauto" int_or_var_opt(d) "with" ne_preident_list(l) ] -> [ typeclasses_eauto d l ] - | [ "typeclasses" "eauto" depth(d) ] -> [ + | [ "typeclasses" "eauto" int_or_var_opt(d) ] -> [ typeclasses_eauto ~only_classes:true ~depth:d [Hints.typeclasses_db] ] END diff --git a/test-suite/bugs/closed/5093.v b/test-suite/bugs/closed/5093.v new file mode 100644 index 000000000..3ded4dd30 --- /dev/null +++ b/test-suite/bugs/closed/5093.v @@ -0,0 +1,11 @@ +Axiom P : nat -> Prop. +Axiom PS : forall n, P n -> P (S n). +Axiom P0 : P 0. + +Hint Resolve PS : foobar. +Hint Resolve P0 : foobar. + +Goal P 100. +Proof. +Fail typeclasses eauto 100 with foobar. +typeclasses eauto 101 with foobar. |