File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -1107,6 +1107,15 @@ let find_hint_db s =
11071107 with Not_found ->
11081108 err Pp. (str " Hint DB not found: " ++ str s)
11091109
1110+ [%% if coq = " 8.20" || coq = " 9.0" ]
1111+ let hint_mode env gr db =
1112+ let modes = Hints.Hint_db. modes db in
1113+ List. map (fun a -> Array. to_list a) @@ GlobRef.Map. find gr modes
1114+ [%% else ]
1115+ let hint_mode env gr db =
1116+ List. map (fun a -> Array. to_list a) @@ Hints.Hint_db. find_mode env gr db
1117+ [%% endif]
1118+
11101119let hint_db : (string * Hints.Hint_db.t) Conv.t = {
11111120 Conv. ty = B. string .Conv. ty;
11121121 Conv. pp_doc = B. string .Conv. pp_doc;
@@ -2918,11 +2927,9 @@ Supported attributes:|} ^ hint_locality_doc)))),
29182927 In(gref , "GR" ,
29192928 In(hint_db , "DB" ,
29202929 Out(B. list (B. list mode ), "Modes" ,
2921- Easy {|Gets all the mode declarations in DB about GR|} ))),
2922- (fun gr (_ ,db ) _ ~depth :_ ->
2923- try
2924- let modes = Hints.Hint_db. modes db in
2925- !: (List. map (fun a -> Array. to_list a ) @@ GlobRef.Map. find gr modes )
2930+ Read(global , {|Gets all the mode declarations in DB about GR|} )))),
2931+ (fun gr (_ ,db ) _ ~depth :_ { env } _ _ ->
2932+ try !: (hint_mode env gr db )
29262933 with Not_found ->
29272934 !: []
29282935 )),
You can’t perform that action at this time.
0 commit comments