@@ -17,10 +17,11 @@ open Jkind_types
1717open Jkind_axis
1818open Types
1919
20- module Le_result = Misc_stdlib. Le_result
20+ (* Merlin-specific: change some module paths to match the compiler *)
2121module Misc = struct
2222 include Misc
2323 module Stdlib = Misc_stdlib
24+ include Misc_stdlib
2425end
2526
2627[@@@ warning " +9" ]
@@ -54,7 +55,7 @@ module Sub_result = struct
5455 | Less
5556 | Not_le of Sub_failure_reason .t Nonempty_list .t
5657
57- let of_le_result ~failure_reason (le_result : Le_result.t ) =
58+ let of_le_result ~failure_reason (le_result : Misc. Le_result.t ) =
5859 match le_result with
5960 | Less -> Less
6061 | Equal -> Equal
@@ -140,7 +141,7 @@ module Layout = struct
140141 | Product ts ->
141142 Option. map
142143 (fun x -> Sort.Const. Product x)
143- (Misc_stdlib .List. map_option get_sort ts)
144+ (Misc.Stdlib .List. map_option get_sort ts)
144145
145146 let of_sort s =
146147 let rec of_sort : Sort.t -> _ = function
@@ -215,7 +216,7 @@ module Layout = struct
215216 and to_product_sort ts =
216217 Option. map
217218 (fun x -> Sort. Product x)
218- (Misc_stdlib .List. map_option to_sort ts)
219+ (Misc.Stdlib .List. map_option to_sort ts)
219220
220221 let rec get : Sort.t t -> Sort.Flat.t t =
221222 let rec flatten_sort : Sort.t -> Sort.Flat.t t = function
@@ -271,15 +272,15 @@ module Layout = struct
271272 | (Any | Sort _ | Product _ ), _ -> false
272273
273274 let sub t1 t2 =
274- let rec sub t1 t2 : Le_result.t =
275+ let rec sub t1 t2 : Misc. Le_result.t =
275276 match t1, t2 with
276277 | Any , Any -> Equal
277278 | _ , Any -> Less
278279 | Any , _ -> Not_le
279280 | Sort s1 , Sort s2 -> if Sort. equate s1 s2 then Equal else Not_le
280281 | Product ts1 , Product ts2 ->
281282 if List. compare_lengths ts1 ts2 = 0
282- then Le_result. combine_list (List. map2 sub ts1 ts2)
283+ then Misc. Le_result. combine_list (List. map2 sub ts1 ts2)
283284 else Not_le
284285 | Product ts1 , Sort s2 -> (
285286 (* This case could use [to_product_sort] because every component will need
@@ -289,13 +290,13 @@ module Layout = struct
289290 match Sort. decompose_into_product s2 (List. length ts1) with
290291 | None -> Not_le
291292 | Some ss2 ->
292- Le_result. combine_list
293+ Misc. Le_result. combine_list
293294 (List. map2 (fun t1 s2 -> sub t1 (Sort s2)) ts1 ss2))
294295 | Sort s1 , Product ts2 -> (
295296 match Sort. decompose_into_product s1 (List. length ts2) with
296297 | None -> Not_le
297298 | Some ss1 ->
298- Le_result. combine_list
299+ Misc. Le_result. combine_list
299300 (List. map2 (fun s1 t2 -> sub (Sort s1) t2) ss1 ts2))
300301 in
301302 Sub_result. of_le_result (sub t1 t2) ~failure_reason: (fun () ->
@@ -336,7 +337,7 @@ module Layout = struct
336337 | Sort s -> Sort. format ppf s
337338 | Product ts ->
338339 let pp_sep ppf () = Format. fprintf ppf " & " in
339- Misc_stdlib . pp_nested_list ~nested ~pp_element ~pp_sep ppf ts
340+ Misc . pp_nested_list ~nested ~pp_element ~pp_sep ppf ts
340341 in
341342 pp_element ~nested: false ppf layout
342343end
@@ -1357,7 +1358,7 @@ module Desc = struct
13571358 [Const.format] works better for atomic layouts, not products. *)
13581359 | Product lays ->
13591360 let pp_sep ppf () = fprintf ppf " @ & " in
1360- Misc_stdlib . pp_nested_list ~nested ~pp_element: format_desc ~pp_sep ppf
1361+ Misc . pp_nested_list ~nested ~pp_element: format_desc ~pp_sep ppf
13611362 (List. map (fun layout -> { desc with layout }) lays)
13621363 | _ -> (
13631364 match get_const desc with
@@ -2178,7 +2179,7 @@ end = struct
21782179 let missing_cmi_hint ppf type_path =
21792180 let root_module_name p = p |> Path. head |> Ident. name in
21802181 let delete_trailing_double_underscore s =
2181- if Misc.String. ends_with ~suffix: " __" s
2182+ if Misc.Stdlib. String. ends_with ~suffix: " __" s
21822183 then String. sub s 0 (String. length s - 2 )
21832184 else s
21842185 in
@@ -3007,7 +3008,7 @@ module Debug_printers = struct
30073008 | Type_declaration p -> fprintf ppf " Type_declaration %a" Path. print p
30083009 | Type_parameter (p , var ) ->
30093010 fprintf ppf " Type_parameter (%a, %a)" Path. print p
3010- (Misc_stdlib. Option. print Misc_stdlib .String. print)
3011+ (Misc.Stdlib. Option. print Misc.Stdlib .String. print)
30113012 var
30123013 | Newtype_declaration name -> fprintf ppf " Newtype_declaration %s" name
30133014 | Constructor_type_parameter (cstr , name ) ->
0 commit comments