Skip to content

Commit

Permalink
ocamlformat
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierNicole committed Oct 2, 2024
1 parent aebf491 commit cd76621
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
17 changes: 6 additions & 11 deletions compiler/lib/linker.ml
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,9 @@ let load_fragment ~target_env ~filename (f : Fragment.t) =
filename;
if always
then (
always_included :=
{ ar_filename = filename; ar_program = code; ar_requires = requires }
:: !always_included;
always_included :=
{ ar_filename = filename; ar_program = code; ar_requires = requires }
:: !always_included;
`Ok)
else
error
Expand Down Expand Up @@ -585,22 +585,17 @@ let check_deps () =

let load_file ~target_env filename =
List.iter (Fragment.parse_file filename) ~f:(fun frag ->
let (`Ok | `Ignored) =
load_fragment ~target_env ~filename frag
in
let (`Ok | `Ignored) = load_fragment ~target_env ~filename frag in
())

let load_fragments ~target_env ~filename l =
List.iter l ~f:(fun frag ->
let (`Ok | `Ignored) =
load_fragment ~target_env ~filename frag
in
let (`Ok | `Ignored) = load_fragment ~target_env ~filename frag in
());
check_deps ()

let load_files ~target_env l =
List.iter l ~f:(fun filename ->
load_file ~target_env filename);
List.iter l ~f:(fun filename -> load_file ~target_env filename);
check_deps ()

(* resolve *)
Expand Down
11 changes: 3 additions & 8 deletions compiler/lib/linker.mli
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,9 @@ end

val reset : unit -> unit

val load_files :
target_env:Target_env.t -> string list -> unit

val load_fragments :
target_env:Target_env.t
-> filename:string
-> Fragment.t list
-> unit
val load_files : target_env:Target_env.t -> string list -> unit

val load_fragments : target_env:Target_env.t -> filename:string -> Fragment.t list -> unit

val check_deps : unit -> unit

Expand Down

0 comments on commit cd76621

Please sign in to comment.