From: Shaddin Doghmi <shaddin@mitre.org>
To: caml-list@inria.fr
Subject: [Caml-list] unexpected functor behavior in 3.08.1 compiler
Date: Mon, 27 Sep 2004 18:32:23 -0400 [thread overview]
Message-ID: <415894F7.1060205@mitre.org> (raw)
I am experiencing unexpected functor behaviour using the 3.08.1 compiler
(both ocamlc and ocamlopt). The 3.07+2 compiler works great and does not
have this problem. I am wondering if it is a known bug, despite the fact
that i was not able to replicate this behaviour with a small example(it
only happens in a large project im working on, and only in 3.08.1).
In a functor:
module A(B:Bsig) = struct
module B =B
open B
let x=B.name
let y = name
end
when i make two instances of functor A using two different input modules
B1 and B2
A1=A(B1)
A2=A(B2)
i sometimes find that A2.y refers to B1.name as opposed to B2.name ,
while A2.x correctly refers to B2.name . Hence, it seems that using the
open statement when creating A2 is "opening" B1 as opposed to B2 .....
for some reason i wasnt able to replicate this behaviour in a small
example, so i dont know under exactly what circumstances this happens....
has anybody else seen this kind of behaviour before? does it have
anything to do with how open is defined inside functors?
-------------------
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-27 22:32 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=415894F7.1060205@mitre.org \
--to=shaddin@mitre.org \
--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