11open Import
2+ open Memo.O
23
34(* Artifact substitutions works as follow: the substitution is encoded as a
45 string of the form:
@@ -94,7 +95,6 @@ module Conf = struct
9495 ;;
9596
9697 let sign_hook_of_context (context : Context.t ) =
97- let open Memo.O in
9898 let + config =
9999 let + ocaml = Context. ocaml context in
100100 ocaml.ocaml_config
@@ -116,7 +116,6 @@ module Conf = struct
116116 ;;
117117
118118 let of_context (context : Context.t ) =
119- let open Memo.O in
120119 let get_vcs = Source_tree. nearest_vcs in
121120 let name = Context. name context in
122121 let get_location = Install.Paths. get_local_location name in
@@ -139,7 +138,6 @@ module Conf = struct
139138 ;;
140139
141140 let of_install ~relocatable ~roots ~(context : Context.t ) =
142- let open Memo.O in
143141 let get_vcs = Source_tree. nearest_vcs in
144142 let hardcoded_ocaml_path =
145143 match relocatable with
@@ -194,7 +192,6 @@ let eval t ~(conf : Conf.t) =
194192 let relocatable path =
195193 (* return a relative path to the install directory in case of relocatable
196194 instead of absolute path *)
197- let open Memo.O in
198195 conf.hardcoded_ocaml_path
199196 >> | function
200197 | Hardcoded _ -> Path. to_absolute_filename path
@@ -205,8 +202,7 @@ let eval t ~(conf : Conf.t) =
205202 Fiber. return (Array. make n s |> Array. to_list |> String. concat ~sep: " " )
206203 | Vcs_describe p ->
207204 Memo. run
208- (let open Memo.O in
209- conf.get_vcs p
205+ (conf.get_vcs p
210206 >> = function
211207 | None -> Memo. return " "
212208 | Some vcs ->
@@ -215,21 +211,19 @@ let eval t ~(conf : Conf.t) =
215211 | Location (name , lib_name ) ->
216212 conf.get_location name lib_name |> relocatable |> Memo. run
217213 | Configpath d ->
218- let open Memo.O in
219214 (let * dir = conf.get_config_path d in
220215 match dir with
221216 | None -> Memo. return None
222217 | Some dir -> relocatable dir >> | Option. some)
223218 >> | Option. value ~default: " "
224219 |> Memo. run
225220 | Hardcoded_ocaml_path ->
226- (let open Memo.O in
227- conf.hardcoded_ocaml_path
228- >> | function
229- | Relocatable _ -> " relocatable"
230- | Hardcoded l ->
231- let l = List. map l ~f: Path. to_absolute_filename in
232- " hardcoded\000 " ^ String. concat ~sep: " \000 " l)
221+ conf.hardcoded_ocaml_path
222+ >> | (function
223+ | Relocatable _ -> " relocatable"
224+ | Hardcoded l ->
225+ let l = List. map l ~f: Path. to_absolute_filename in
226+ " hardcoded\000 " ^ String. concat ~sep: " \000 " l)
233227 |> Memo. run
234228;;
235229
0 commit comments