Skip to content

Commit

Permalink
BatOption -> Option
Browse files Browse the repository at this point in the history
Signed-off-by: Sora Morimoto <sora@morimoto.io>
  • Loading branch information
smorimoto committed Jul 4, 2024
1 parent 80d976c commit b21c43c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ let resolve_lib_file_scheme (relpath : lib_path) : string option * string list =

let resolve_lib_file_opt (relpath : lib_path) : abs_path option =
let (opt, _) = resolve_lib_file_scheme relpath in
opt |> BatOption.map make_abs_path
opt |> Option.map make_abs_path


let resolve_lib_file_exn (relpath : lib_path) : abs_path =
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/evaluator.cppo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ and interpret_1 (env : environment) (ast : abstract_tree) : code_value * environ
let (codept0, _) = interpret_1 env astpt0 in
let cdpathcomplst = pathcomplst |> List.map (map_path_component (interpret_1_value env) (interpret_1_value env)) in
let cdcycleopt =
cycleopt |> BatOption.map (map_path_component (interpret_1_value env) (fun () -> ())
cycleopt |> Option.map (map_path_component (interpret_1_value env) (fun () -> ())
)
in
return @@ CdPath(codept0, cdpathcomplst, cdcycleopt)
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/types.cppo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,7 @@ let rec unlift_code (code : code_value) : abstract_tree =
List.map (map_path_component aux aux) cdpath

and aux_cycle cdcycleopt =
cdcycleopt |> BatOption.map (map_path_component aux (fun () -> ()))
cdcycleopt |> Option.map (map_path_component aux (fun () -> ()))

in
aux code
Expand Down
2 changes: 1 addition & 1 deletion src/myYojsonUtil.ml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let syntax_error srcpath msg =

let make_range (pos : Yojson.position) =
let open Yojson in
let fname = BatOption.default "(none)" pos.file_name in
let fname = Option.value ~default:"(none)" pos.file_name in
Range.make_large fname pos.start_line pos.start_column pos.end_line pos.end_column


Expand Down

0 comments on commit b21c43c

Please sign in to comment.