Browse thread
[Caml-list] Mutability analysis too strict?
- Ohad Rodeh
[
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: | 2001-12-10 (06:17) |
From: | Ohad Rodeh <ORODEH@i...> |
Subject: | [Caml-list] Mutability analysis too strict? |
List, I have a problem with the mutability analysis for hash-tables. For example: let h = Hashtbl.create 10 ;; creates: h : ('_a, '_b) Hashtbl.t instead of: h ('a, 'b) Hashtbl.t My specific hashtable contains immutable objects that can be added and removed to the table. The default analysis is too strict, forcing me to use Obj.magic for coercion ('_b -> 'b). This is safe in this case, because I know the objects are immutable. However, in the general case, I don't see why it is neccessary. Anyone cares to explain? Ohad. ------------------- 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