aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-04-09 17:14:18 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-04-09 17:14:18 +0200
commitbb43730ac876b8de79967090afa50f00858af6d5 (patch)
tree8d96531b4869f9ab1e0cd00064f4dbab96cd4ac8 /toplevel
parentb5420538da04984ca42eb4284a9be27f3b5ba021 (diff)
parent84f079fa31723b6a97edc50ca7a81e1eb19e759c (diff)
Merge branch 'v8.5'
Diffstat (limited to 'toplevel')
-rw-r--r--toplevel/classes.ml4
-rw-r--r--toplevel/classes.mli1
2 files changed, 3 insertions, 2 deletions
diff --git a/toplevel/classes.ml b/toplevel/classes.ml
index 2fc0f5ff1..235732b52 100644
--- a/toplevel/classes.ml
+++ b/toplevel/classes.ml
@@ -121,7 +121,7 @@ let declare_instance_constant k pri global imps ?hook id pl poly evm term termty
instance_hook k pri global imps ?hook (ConstRef kn);
id
-let new_instance ?(abstract=false) ?(global=false) poly ctx (instid, bk, cl) props
+let new_instance ?(abstract=false) ?(global=false) ?(refine= !refine_instance) poly ctx (instid, bk, cl) props
?(generalize=true)
?(tac:unit Proofview.tactic option) ?hook pri =
let env = Global.env() in
@@ -293,7 +293,7 @@ let new_instance ?(abstract=false) ?(global=false) poly ctx (instid, bk, cl) pro
if not (Evd.has_undefined evm) && not (Option.is_empty term) then
declare_instance_constant k pri global imps ?hook id pl
poly evm (Option.get term) termtype
- else if Flags.is_program_mode () || !refine_instance || Option.is_empty term then begin
+ else if Flags.is_program_mode () || refine || Option.is_empty term then begin
let kind = Decl_kinds.Global, poly, Decl_kinds.DefinitionBody Decl_kinds.Instance in
if Flags.is_program_mode () then
let hook vis gr _ =
diff --git a/toplevel/classes.mli b/toplevel/classes.mli
index a3e948d96..7beb873e6 100644
--- a/toplevel/classes.mli
+++ b/toplevel/classes.mli
@@ -40,6 +40,7 @@ val declare_instance_constant :
val new_instance :
?abstract:bool -> (** Not abstract by default. *)
?global:bool -> (** Not global by default. *)
+ ?refine:bool -> (** Allow refinement *)
Decl_kinds.polymorphic ->
local_binder list ->
typeclass_constraint ->