From: "Warp" <warplayer@free.fr>
To: "OCaml" <caml-list@inria.fr>
Subject: [Caml-list] Strange behavior
Date: Sun, 3 Feb 2002 12:14:13 +0100 [thread overview]
Message-ID: <000301c1acf2$eef10300$9b00a8c0@warp> (raw)
Here's a very short sample of a very strange behavior with CMA. I don't know
if it's a "bug" but it looks like...
I got a CMA ( let's call it Main ) :
---- Main.ml -----
include Types
include Funcs
---- Types.ml -----
type ta
type tb = ta
external get_ta : unit -> ta = "get"
---- Funcs.ml ----
open Types
external f : tb -> unit = "function"
And a test program :
---- Test.ml -----
open Main
f (get_ta())
Let's compile :
ocamlc -c types.ml
ocamlc -c funcs.ml
ocamlc -a main.ml -o main.cma
ocamlc -c test.ml
It works !
Now, we doesn't need anymore the CMI / CMO of Types and Funcs ( because all
defs are included in main.cma+cmi ), so let's delete theses files :
rm types.c*
rm funcs.c*
... and try to compile Test :
ocamlc -c test.ml
This expression has type Main.ta = Types.ta but is here used with Types.tb
In fact, we need to keep the Types.cmi to compile, breaking the CMA rules. I
think this behavior comes from the "include" directive, which is
conservative with type paths.
Warp
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
reply other threads:[~2002-02-03 20:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='000301c1acf2$eef10300$9b00a8c0@warp' \
--to=warplayer@free.fr \
--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