summaryrefslogtreecommitdiff
path: root/parsing/depend.ml
diff options
context:
space:
mode:
authorLeo White <leo@lpw25.net>2019-05-23 16:27:58 +0100
committerLeo White <leo@lpw25.net>2019-05-23 16:27:58 +0100
commitacd06f1eff2f560f7a5b652915322007995e02f0 (patch)
treeb9812b2e087c31ec376c97357aebf97a9a8f2680 /parsing/depend.ml
parent01b93c85965465826fc434f99c8805dbaf7c4b1f (diff)
downloadocaml-acd06f1eff2f560f7a5b652915322007995e02f0.tar.gz
Remove Misc.may_map and similar
Diffstat (limited to 'parsing/depend.ml')
-rw-r--r--parsing/depend.ml8
1 files changed, 4 insertions, 4 deletions
diff --git a/parsing/depend.ml b/parsing/depend.ml
index ddaf182d88..8e0a3711f7 100644
--- a/parsing/depend.ml
+++ b/parsing/depend.ml
@@ -133,7 +133,7 @@ let add_constructor_arguments bv = function
let add_constructor_decl bv pcd =
add_constructor_arguments bv pcd.pcd_args;
- Misc.may (add_type bv) pcd.pcd_res
+ Option.iter (add_type bv) pcd.pcd_res
let add_type_declaration bv td =
List.iter
@@ -153,7 +153,7 @@ let add_extension_constructor bv ext =
match ext.pext_kind with
Pext_decl(args, rty) ->
add_constructor_arguments bv args;
- Misc.may (add_type bv) rty
+ Option.iter (add_type bv) rty
| Pext_rebind lid -> add bv lid
let add_type_extension bv te =
@@ -284,7 +284,7 @@ and add_modtype bv mty =
| Pmty_alias l -> add_module_path bv l
| Pmty_signature s -> add_signature bv s
| Pmty_functor(id, mty1, mty2) ->
- Misc.may (add_modtype bv) mty1;
+ Option.iter (add_modtype bv) mty1;
add_modtype (String.Map.add id.txt bound bv) mty2
| Pmty_with(mty, cstrl) ->
add_modtype bv mty;
@@ -398,7 +398,7 @@ and add_module_expr bv modl =
Pmod_ident l -> add_module_path bv l
| Pmod_structure s -> ignore (add_structure bv s)
| Pmod_functor(id, mty, modl) ->
- Misc.may (add_modtype bv) mty;
+ Option.iter (add_modtype bv) mty;
add_module_expr (String.Map.add id.txt bound bv) modl
| Pmod_apply(mod1, mod2) ->
add_module_expr bv mod1; add_module_expr bv mod2