Loading ...
Sorry, an error occurred while loading the content.

Re: "ocaml_beginners"::[] Re: problem when compiling 2 modules

Expand Messages
  • Francois Berenger
    ... I see. Thanks a lot! :)
    Message 1 of 5 , Jan 27, 2011
    • 0 Attachment
      Virgile Prevosto wrote:
      > Hello,
      >
      > 2011/1/27 Francois Berenger <berenger@...
      > <mailto:berenger%40riken.jp>>:
      > > Nice!
      > > Then it compiles well.
      > > And also, my source files are even more simpler.
      > > However, if I use the toplevel with these files, then I bump into this:
      > >
      > > ---
      > > ocaml
      > > Objective Caml version 3.11.0
      > >
      > > # #use "vector3.ml";;
      > > type vector3 = { x : float; y : float; z : float; }
      > > # #use "atom.ml";;
      > > File "atom.ml", line 1, characters 0-12:
      > > Error: Unbound module Vector3
      > > ---
      > >
      > > Can't I have the best from both worlds? :D
      > >
      > > What should I do from the toplevel when I want to use
      > > both of these modules?
      >
      > the #use directive imports the definition of vector3.ml as if they
      > were typed directly in the toplevel. Hence, you don't have a module
      > implicitely defined for you. For that, you have to compile vector3.ml
      > and #load "vector3.cmo".

      I see. Thanks a lot! :)
    Your message has been successfully submitted and would be delivered to recipients shortly.