From: Ching-Tsun Chou <ctchou@mipos2.intel.com>
To: caml-list@inria.fr
Subject: [Caml-list] An elementary question about ocamlmktop
Date: Wed, 27 Nov 2002 23:44:13 -0800 (PST) [thread overview]
Message-ID: <200211280744.XAA03778@zws707.sc.intel.com> (raw)
I'm sure this question of mine has a simple answer, but, alas, I
couldn't figure it out myself after many trials!
Suppose I have a subdirectory "zzz" under my home directory which
contains a file "foo.ml" whose content is:
$ cat zzz/foo.ml
let hello () = Printf.printf "Hello, world!\n"
where "$ " is the shell prompt. Now I do the following:
$ cd zzz
$ ocamlmktop foo.ml -o foo
$ ./foo
Objective Caml version 3.06
# Foo.hello () ;;
Hello, world!
- : unit = ()
So far, so good. But now I do the following:
$ cd
$ zzz/foo
Objective Caml version 3.06
# Foo.hello () ;;
Characters 0-9:
Foo.hello () ;;
^^^^^^^^^
Unbound value Foo.hello
I think the problem is that ocamlrun can't find "foo.cmi", since the
same problem occurs even in "zzz" if "foo.cmi" is removed (removing
"foo.cmo" apparently has no effect). However, if I do:
$ zzz/foo -I ~/zzz
Objective Caml version 3.06
# Foo.hello () ;;
Hello, world!
- : unit = ()
then everything works again (assuming "zzz/foo.cmi" is still there).
My question is: Is there any way to generate a toplevel "foo" that
contains the information in "foo.cmi", so that it can (so to speak)
exists by itself?
Many thanks in advance!
- Ching Tsun
-------------------
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
next reply other threads:[~2002-11-28 7:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-28 7:44 Ching-Tsun Chou [this message]
2002-11-30 19:28 ` Chris Hecker
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=200211280744.XAA03778@zws707.sc.intel.com \
--to=ctchou@mipos2.intel.com \
--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