caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Malte Obbel Forsberg <malte@unix.se>
To: caml-list@inria.fr
Subject: [Caml-list] Problem with ocamlmktop
Date: Sat, 11 Sep 2004 00:28:35 +0200	[thread overview]
Message-ID: <41422A93.8020606@unix.se> (raw)

Hello fellow O'Caml-users,

I'm pretty new to O'Caml, and there's something with ocamlmktop that 
puzzles me (albeit it probably being rational behaviour that I merely 
need to comprehend before I can move on and solve the problem :-)):

When I make a new toplevel, by first running ocaml -c for site.mli and 
then for site.ml, with ocamlmktop site.cmo, I can't seem to use it if it 
doesnt stay in the same directory as the *.cm* files reside. Furtermore 
it seems I have to be in that directory when executing my toplevel as 
well. The following text describes the phenomena:

/var/www/site# ocamlmktop site.cmo -o site-toplevel
/var/www/site# ls
site-toplevel  site.cmi  site.cmo  site.ml  site.mli
/var/www/site# ./site-toplevel
         Objective Caml version 3.08.1

# Site.read ;;
- : string -> string = <fun>
#
/var/www/site# cd ..
/var/www# ./site/site-toplevel
         Objective Caml version 3.08.1

# Site.read ;;
Unbound value Site.read
#

Now, what I want to do is to use a modified toplevel for mod_ocaml, so I 
won't have to redefine my functions in every ocml (html with ocaml-code 
in it, handled by mod_ocaml) file! I suppose, being quite new to O'Caml, 
I might have missed some other way to achieve this; please enlighten me 
if that is so. :-)

What I want to know, then, is if there is some way to define functions 
in an external file and then use the functions in an other interpreted 
file, with "open Site;;" or similar.

Best regards,
Malte Obbel Forsberg

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


             reply	other threads:[~2004-09-10 22:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-10 22:28 Malte Obbel Forsberg [this message]
2004-09-11 16:13 ` David MENTRE

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41422A93.8020606@unix.se \
    --to=malte@unix.se \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).