aboutsummaryrefslogtreecommitdiff
path: root/plugins/ssr
diff options
context:
space:
mode:
authorMaxime Dénès2018-07-20 18:01:18 +0200
committerMaxime Dénès2018-07-26 14:42:45 +0200
commitf54192a50eaf14852e1462f24e4168aa8a8545fe (patch)
tree64696d9c111f420e9bff7d7f742602a6b38f8b0a /plugins/ssr
parent85d5f45d7a5374646a31f8829965bbfed0a95070 (diff)
Coercions cleanup: use GlobRef.t instead of constr
Diffstat (limited to 'plugins/ssr')
-rw-r--r--plugins/ssr/ssrvernac.ml48
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/ssr/ssrvernac.ml4 b/plugins/ssr/ssrvernac.ml4
index 7ce2dd64af..8ce0316f53 100644
--- a/plugins/ssr/ssrvernac.ml4
+++ b/plugins/ssr/ssrvernac.ml4
@@ -24,7 +24,6 @@ open Ltac_plugin
open Notation_ops
open Notation_term
open Glob_term
-open Globnames
open Stdarg
open Genarg
open Decl_kinds
@@ -359,13 +358,12 @@ let coerce_search_pattern_to_sort hpat =
true, cp
with _ -> false, [] in
let coerce hp coe_index =
- let coe = Classops.get_coercion_value coe_index in
+ let coe_ref = coe_index.Classops.coe_value in
try
- let coe_ref = global_of_constr coe in
let n_imps = Option.get (Classops.hide_coercion coe_ref) in
mkPApp (Pattern.PRef coe_ref) n_imps [|hp|]
- with _ ->
- errorstrm (str "need explicit coercion " ++ pr_constr_env env sigma coe ++ spc ()
+ with Not_found | Option.IsNone ->
+ errorstrm (str "need explicit coercion " ++ pr_global coe_ref ++ spc ()
++ str "to interpret head search pattern as type") in
filter_head, List.fold_left coerce hpat' coe_path