summaryrefslogtreecommitdiff
path: root/parsing
diff options
context:
space:
mode:
authorNicolás Ojeda Bär <n.oje.bar@gmail.com>2020-05-21 08:51:16 +0200
committerGitHub <noreply@github.com>2020-05-21 08:51:16 +0200
commit9b748843bbaabff04f6b162add0600335e317fcf (patch)
tree3804f01d2fe6cc8ab1ae6326ad5e45f74300d6f8 /parsing
parenta151e9187be5610535ec4c7fcc56b1e83bb38754 (diff)
downloadocaml-9b748843bbaabff04f6b162add0600335e317fcf.tar.gz
Use List.find_map (#9589)
Diffstat (limited to 'parsing')
-rw-r--r--parsing/location.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/parsing/location.ml b/parsing/location.ml
index aa596c8537..fa31feafd4 100644
--- a/parsing/location.ml
+++ b/parsing/location.ml
@@ -294,19 +294,19 @@ struct
List.exists (fun ((_, s), (_, e)) -> s <= pos && pos <= e) iset
let find_bound_in iset ~range:(start, end_) =
- Misc.Stdlib.List.find_map (fun ((a, x), (b, y)) ->
+ List.find_map (fun ((a, x), (b, y)) ->
if start <= x && x <= end_ then Some (a, x)
else if start <= y && y <= end_ then Some (b, y)
else None
) iset
let is_start iset ~pos =
- Misc.Stdlib.List.find_map (fun ((a, x), _) ->
+ List.find_map (fun ((a, x), _) ->
if pos = x then Some a else None
) iset
let is_end iset ~pos =
- Misc.Stdlib.List.find_map (fun (_, (b, y)) ->
+ List.find_map (fun (_, (b, y)) ->
if pos = y then Some b else None
) iset