Hello, The usual limitation of serialization and hashing of closures is sometimes painful, especially with the current temptation of parallelisation. I am involved in two projects/sofwares that are impacted by this: bindlib[1] (where data structure using bound variables uses closures) and Patoline[2] (where documents using animation and compiled with the "Bin" driver contain closures). There is a simple way out of this problem, at least for libraries where the function pointer in closure can be predicted enough : - use a table associating function "names" (position in the .cmo, or the lambda-tree or anything portable) to source code adresses. The function name should be portable across architecture and distinct binary using common librairies. - (1) fill this table by calling a function "register_code_pointer : ('a -> 'b) -> unit" - (2) or even better offer a linking option to register all closures from some compilation unit. With this, serialisation and hashing functions could use those "names" instead of addresses. Thus we would have reproducible hash and portable serialization for registered functions in closure. I will probably try this soon by adding custom version of Hash and Marshal to bindlib using (1) ... But support from real OCaml giving (2) would be much better. So my question is : are you ennoyed by this problem, and, if yes, would you be happy with the above solutions. Cheers, Christophe [1] http://www.lama.univ-savoie.fr/~raffalli/bindlib [2] http://www.patoline.com -- Christophe Raffalli Universite de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tel: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution can check this signature. The public key is stored on www.keyserver.net ---------------------------------------------