OCaml toplevel multiple dependencies

When I have several dependencies, say

module A = struct
  open B
  ...
  end

module B = struct
  ...
  end

Is it possible to download the OCaml toplevel / utop A.ml download with all the dependencies (i.e. #use "./A.ml"B.ml automatically loads)?

+4
source share
1 answer

You must compile all your modules with ocamlc to create files a.cmoand b.cmothen run ocaml b.cmo a.cmo(order is important because it Bmust be loaded before A).

+3
source

Source: https://habr.com/ru/post/1534376/


All Articles