aboutsummaryrefslogtreecommitdiff
path: root/toplevel
diff options
context:
space:
mode:
Diffstat (limited to 'toplevel')
-rw-r--r--toplevel/classes.ml14
-rw-r--r--toplevel/vernacentries.ml8
2 files changed, 16 insertions, 6 deletions
diff --git a/toplevel/classes.ml b/toplevel/classes.ml
index e4df5acbfa..9f3b3343cb 100644
--- a/toplevel/classes.ml
+++ b/toplevel/classes.ml
@@ -492,10 +492,12 @@ let context ?(hook=fun _ -> ()) l =
add_instance (Typeclasses.new_instance tc None false cst);
hook (ConstRef cst)
| None -> ()
- else
- (Command.declare_one_assumption false (Local (* global *), Definitional) t
- [] true (* implicit *) true (* always kept *) false (* inline *) (dummy_loc, id);
- match class_of_constr t with
- None -> ()
- | Some tc -> hook (VarRef id)))
+ else (
+ let impl = List.exists (fun (x,_) -> match x with ExplByPos (_, Some id') -> id = id' | _ -> false) impls
+ in
+ Command.declare_one_assumption false (Local (* global *), Definitional) t
+ [] impl (* implicit *) true (* always kept *) false (* inline *) (dummy_loc, id);
+ match class_of_constr t with
+ | None -> ()
+ | Some tc -> hook (VarRef id)))
(List.rev ctx)
diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml
index 65b36edb60..afa667ad91 100644
--- a/toplevel/vernacentries.ml
+++ b/toplevel/vernacentries.ml
@@ -785,6 +785,14 @@ let _ =
let _ =
declare_bool_option
{ optsync = true;
+ optname = "manual implicit arguments";
+ optkey = (TertiaryTable ("Manual","Implicit","Arguments"));
+ optread = Impargs.is_manual_implicit_args;
+ optwrite = Impargs.make_manual_implicit_args }
+
+let _ =
+ declare_bool_option
+ { optsync = true;
optname = "strict implicit arguments";
optkey = (SecondaryTable ("Strict","Implicit"));
optread = Impargs.is_strict_implicit_args;