OCAML offers multiple dependencies

When I have multiple dependencies, for example

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)?

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).

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).

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2301 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.