module A = struct
open B< br /> ...
end
module B = struct
...
end
Is it possible to make OCaml top-level/utop load A.ml with all dependencies (ie #use”./A.ml” automatically loads B.ml)?
When I have multiple dependencies, let’s say
module A = struct
open B
...
end
module B = struct
.. .
end
Is it possible to make OCaml top-level/utop load A.ml with all dependencies (ie #use”./A.ml” automatically loads B.ml)?
You should use ocamlc to compile all modules to generate files a.cmo and b.cmo, and then run ocaml b.cmo a.cmo (the order is important, Because B must be loaded before A).