RE: [Caml-list] Marshalling question

2010-10-08 Thread David Allsopp
Jean Krivine wrote: Dear ocaml users, A simple question: is it safe to marshalize a data structure that contains imperative elements (like arrays or hashtbl) ? Simple answer: yes. Marshal works on the runtime representation of data which is imperative (immutability is enforced by the type

Re: [Caml-list] Marshalling question

2010-10-08 Thread Mathias Kende
Le vendredi 08 octobre 2010 à 15:37 +0200, Jean Krivine a écrit : Dear ocaml users, A simple question: is it safe to marshalize a data structure that contains imperative elements (like arrays or hashtbl) ? It's relatively safe to do so. The only thing is that if it is unmarshalled in the

[Caml-list] Type constraint to explain that a polymorphic variants is included into another

2010-10-08 Thread Sylvain Le Gall
Hello all, I would like to build an interface for plugins that allow to extract at the same time a very specific data for a plugin family and to extract general help for plugins. Here is an example: (** All the plugins I want to manage *) type plugin_kind = [`Build | `Install] (** Generic

Re: [Caml-list] Type constraint to explain that a polymorphic variants is included into another

2010-10-08 Thread Jake Donham
On Fri, Oct 8, 2010 at 10:13 AM, Sylvain Le Gall sylv...@le-gall.net wrote: This code doesn't compile because I see no way to explain that F.kind is included into plugin_kind. As you have written it, F.kind is of course completely abstract. I am not sure where you need F.kind to be a strict

Re: [Caml-list] Type constraint to explain that a polymorphic variants is included into another

2010-10-08 Thread Jacques Garrigue
On 2010/10/09, at 2:13, Sylvain Le Gall wrote: Hello all, I would like to build an interface for plugins that allow to extract at the same time a very specific data for a plugin family and to extract general help for plugins. Here is an example: [...] This code doesn't compile because

[Caml-list] Re: Type constraint to explain that a polymorphic variants is included into another

2010-10-08 Thread Sylvain Le Gall
On 08-10-2010, Jake Donham j...@donham.org wrote: On Fri, Oct 8, 2010 at 10:13 AM, Sylvain Le Gall sylv...@le-gall.net wrote: This code doesn't compile because I see no way to explain that F.kind is included into plugin_kind. As you have written it, F.kind is of course completely abstract. I