Skip to content

Commit

Permalink
refactor: simplify some code with point free style (ocaml#11069)
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>

<!-- ps-id: 8df5e5c5-eafa-4d52-a3e6-7ece46df7214 -->
  • Loading branch information
rgrinberg authored Nov 1, 2024
1 parent c215047 commit bbedcc8
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/dune_rules/install_rules.ml
Original file line number Diff line number Diff line change
Expand Up @@ -734,17 +734,14 @@ end = struct
Action_builder.write_file_dyn
dune_package_file
(let open Action_builder.O in
let+ pkg =
Package_paths.meta_template ctx pkg
|> Path.build
|> Action_builder.if_file_exists
~then_:(Action_builder.return Dune_package.Or_meta.Use_meta)
~else_:(make_dune_package sctx lib_entries pkg)
in
Format.asprintf
"%a"
(Dune_package.Or_meta.pp ~dune_version ~encoding:Relative)
pkg)
Package_paths.meta_template ctx pkg
|> Path.build
|> Action_builder.if_file_exists
~then_:(Action_builder.return Dune_package.Or_meta.Use_meta)
~else_:(make_dune_package sctx lib_entries pkg)
>>| Format.asprintf
"%a"
(Dune_package.Or_meta.pp ~dune_version ~encoding:Relative))
in
let* () =
let deprecated_dune_packages =
Expand Down

0 comments on commit bbedcc8

Please sign in to comment.