Browse thread
[Caml-list] unexpected functor behavior in 3.08.1 compiler
- Shaddin Doghmi
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Shaddin Doghmi <shaddin@m...> |
| Subject: | [Caml-list] unexpected functor behavior in 3.08.1 compiler |
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