Re: Referencing symbols in different files

Lukasz Stafiniak <[email protected]>
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <CAJMfKEWF81T3V58F0nB-M4=XT_JXgkYFi9z2CxZ2mc72EsHtBg@mail.gmail.com>
On Sat, Jan 11, 2014 at 5:32 PM, Pankrath <[email protected]> wrote:

>
>
> Hello everyone,
>
> I'm looking into LLVM and since one of the Kaleidoscope tutorials [1] is
> written in OCaml, I thought it would be a good opportunity to a have
> a look at OCaml, too. Now I've got the example code on their page and
> wanted to play with it in the REPL.
>
> However this does not work using »#use«:
>
> tobias@akela ocaml [i] % ocaml
> OCaml version 4.01.0
>
> # #load "dynlink.cma";;
> # #load "camlp4o.cma";;
> Camlp4 Parsing version 4.01.0
>
> # #use "token.ml";;
>
You could try this:

> # #load "token.cmo";;

The directive loads byte-compiled code, ".cmo" stands for module code and
".cma" stands for library code (a set of modules). You need to compile "
token.ml" first.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.