[EDIT]
Thank you for your answer, my problem is the following :
Module A called Map.ml
let lst = ref [Instance1_ModuleB; Instance2_ModuleB; ...];; let is_coliding p = DoSomeWork_And_Return_A_Bool ;; .... other things here.
Module B called Player.ml
Open Map class player_object (x_in, y_in, name_in)= object (self) method jump () = if Map.is_colliding self then DoSomeThing ();; ....
Any clue how to make that works.
By the way, how do other programming languages hundle that? I never care about such dependency in C#!!!!! Thanks
If your module A only need type from module B and no value, then you can create a moduleB.mli with the interface of module B, and compile it before moduleA:
moduleA.ml:
moduleB.mli:
moduleB.ml
But if you have circular dependency on value or function it there is no simple solution, as for example for :
moduleA.ml:
One can try to break such a circular dependency by using reference or mutable value in general:
moduleA.ml:
moduleB.ml