* [Caml-list] unexpected functor behavior in 3.08.1 compiler
@ 2004-09-27 22:32 Shaddin Doghmi
0 siblings, 0 replies; only message in thread
From: Shaddin Doghmi @ 2004-09-27 22:32 UTC (permalink / raw)
To: caml-list
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-09-27 22:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-27 22:32 [Caml-list] unexpected functor behavior in 3.08.1 compiler Shaddin Doghmi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox