aboutsummaryrefslogtreecommitdiff
path: root/vernac
diff options
context:
space:
mode:
Diffstat (limited to 'vernac')
-rw-r--r--vernac/classes.ml8
-rw-r--r--vernac/g_vernac.mlg7
-rw-r--r--vernac/ppvernac.ml3
-rw-r--r--vernac/record.ml5
-rw-r--r--vernac/vernacentries.ml2
-rw-r--r--vernac/vernacexpr.ml4
6 files changed, 9 insertions, 20 deletions
diff --git a/vernac/classes.ml b/vernac/classes.ml
index b38a249b73..3485d17951 100644
--- a/vernac/classes.ml
+++ b/vernac/classes.ml
@@ -58,13 +58,7 @@ let is_local_for_hint i =
let add_instance_base inst =
let locality = if is_local_for_hint inst then Goptions.OptLocal else Goptions.OptGlobal in
add_instance_hint (Hints.IsGlobRef inst.is_impl) [inst.is_impl] ~locality
- inst.is_info;
- List.iter (fun (path, pri, c) ->
- let h = Hints.IsConstr (EConstr.of_constr c, None) [@ocaml.warning "-3"] in
- add_instance_hint h path
- ~locality pri)
- (build_subclasses ~check:(not (isVarRef inst.is_impl))
- (Global.env ()) (Evd.from_env (Global.env ())) inst.is_impl inst.is_info)
+ inst.is_info
let mk_instance cl info glob impl =
let global =
diff --git a/vernac/g_vernac.mlg b/vernac/g_vernac.mlg
index e0550fd744..5b039e76f3 100644
--- a/vernac/g_vernac.mlg
+++ b/vernac/g_vernac.mlg
@@ -469,11 +469,8 @@ GRAMMAR EXTEND Gram
[ [ id = identref; c=constructor_type -> { c id } ] ]
;
of_type_with_opt_coercion:
- [ [ ":>>" -> { Some false }
- | ":>"; ">" -> { Some false }
- | ":>" -> { Some true }
- | ":"; ">"; ">" -> { Some false }
- | ":"; ">" -> { Some true }
+ [ [ ":>" -> { Some () }
+ | ":"; ">" -> { Some () }
| ":" -> { None } ] ]
;
END
diff --git a/vernac/ppvernac.ml b/vernac/ppvernac.ml
index b73e7c7515..8a98a43ba0 100644
--- a/vernac/ppvernac.ml
+++ b/vernac/ppvernac.ml
@@ -504,8 +504,7 @@ let pr_intarg n = spc () ++ int n
let pr_oc = function
| None -> str" :"
- | Some true -> str" :>"
- | Some false -> str" :>>"
+ | Some () -> str" :>"
let pr_record_field (x, { rf_subclass = oc ; rf_priority = pri ; rf_notation = ntn }) =
let prx = match x with
diff --git a/vernac/record.ml b/vernac/record.ml
index bd5b71cd6b..79abf94726 100644
--- a/vernac/record.ml
+++ b/vernac/record.ml
@@ -557,7 +557,7 @@ let declare_class def cumulative ubinders univs id idbuild paramimpls params uni
Impargs.declare_manual_implicits false (GlobRef.ConstRef proj_cst) (List.hd fieldimpls);
Classes.set_typeclass_transparency (EvalConstRef cst) false false;
let sub = match List.hd coers with
- | Some b -> Some ((if b then Backward else Forward), List.hd priorities)
+ | Some () -> Some (Backward, List.hd priorities)
| None -> None
in
[cref, [Name proj_name, sub, Some proj_cst]]
@@ -568,8 +568,7 @@ let declare_class def cumulative ubinders univs id idbuild paramimpls params uni
params template ~kind:Decls.Method ~name:[|binder_name|] record_data
in
let coers = List.map2 (fun coe pri ->
- Option.map (fun b ->
- if b then Backward, pri else Forward, pri) coe)
+ Option.map (fun () -> Backward, pri) coe)
coers priorities
in
let map ind =
diff --git a/vernac/vernacentries.ml b/vernac/vernacentries.ml
index fba6800729..60c6d2ec0b 100644
--- a/vernac/vernacentries.ml
+++ b/vernac/vernacentries.ml
@@ -776,7 +776,7 @@ let vernac_inductive ~atts kind indl =
| _ -> CErrors.user_err Pp.(str "Definitional classes do not support the \"|\" syntax.")
in
let (coe, (lid, ce)) = l in
- let coe' = if coe then Some true else None in
+ let coe' = if coe then Some () else None in
let f = AssumExpr ((make ?loc:lid.loc @@ Name lid.v), ce),
{ rf_subclass = coe' ; rf_priority = None ; rf_notation = [] ; rf_canonical = true } in
vernac_record ~template udecl ~cumulative (Class true) ~poly finite [id, bl, c, None, [f]]
diff --git a/vernac/vernacexpr.ml b/vernac/vernacexpr.ml
index d8e17d00e3..721e710e1d 100644
--- a/vernac/vernacexpr.ml
+++ b/vernac/vernacexpr.ml
@@ -106,8 +106,8 @@ type search_restriction =
type verbose_flag = bool (* true = Verbose; false = Silent *)
type coercion_flag = bool (* true = AddCoercion false = NoCoercion *)
-type instance_flag = bool option
- (* Some true = Backward instance; Some false = Forward instance, None = NoInstance *)
+type instance_flag = unit option
+ (* Some () = Backward instance, None = NoInstance *)
type export_flag = bool (* true = Export; false = Import *)