caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Newest Sexplib and Hashtbl
@ 2011-09-18 18:41 Dario Teixeira
  2011-09-18 18:53 ` Markus Mottl
  0 siblings, 1 reply; 2+ messages in thread
From: Dario Teixeira @ 2011-09-18 18:41 UTC (permalink / raw)
  To: caml

[-- Attachment #1: Type: text/plain, Size: 609 bytes --]

Hi,

I've updated to the latest version of Sexplib, and the support for hashtable serialisation
seems broken or at least changed.  I was accustomed to using the syntax extension
for convenient declaration of (de)serialisers, and this worked too for the Hashtbl module.
For example:


type dict_t = (key_t, value_t) Hashtbl.t with sexp

But with Sexplib 7.0.4 this produces an error:


Error: Unbound value Hashtbl.t_of_sexp

Is this a bug, or must the (de)serialisers be declared manually with the newer versions
of Sexplib?

Thanks in advance for your time!
Best regards,
Dario Teixeira

[-- Attachment #2: Type: text/html, Size: 967 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] Newest Sexplib and Hashtbl
  2011-09-18 18:41 [Caml-list] Newest Sexplib and Hashtbl Dario Teixeira
@ 2011-09-18 18:53 ` Markus Mottl
  0 siblings, 0 replies; 2+ messages in thread
From: Markus Mottl @ 2011-09-18 18:53 UTC (permalink / raw)
  To: Dario Teixeira; +Cc: caml

Hi,

There have been some changes to the newest release of Sexplib.  It is
now required to open "Sexplib.Std" to "see" the default converters for
the standard OCaml types.  The same is true for bin-prot.

The code automatically generated by the preprocessor used to hard-code
the converters by explicitly referring to the functions in Sexplib.
But this prevented users from overriding them, motivating Jane Street
to propose this change.

Sorry, it seems that this change hasn't been mentioned in the docs.
This will be fixed in future documentation releases.  Please let me
know if there are any other issues.

Regards,
Markus

On Sun, Sep 18, 2011 at 14:41, Dario Teixeira <darioteixeira@yahoo.com> wrote:
> Hi,
> I've updated to the latest version of Sexplib, and the support for hashtable
> serialisation
> seems broken or at least changed.  I was accustomed to using the syntax
> extension
> for convenient declaration of (de)serialisers, and this worked too for the
> Hashtbl module.
> For example:
>
> type dict_t = (key_t, value_t) Hashtbl.t with sexp
> But with Sexplib 7.0.4 this produces an error:
>
> Error: Unbound value Hashtbl.t_of_sexp
> Is this a bug, or must the (de)serialisers be declared manually with the
> newer versions
> of Sexplib?
> Thanks in advance for your time!
> Best regards,
> Dario Teixeira
>



-- 
Markus Mottl        http://www.ocaml.info        markus.mottl@gmail.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-18 18:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-18 18:41 [Caml-list] Newest Sexplib and Hashtbl Dario Teixeira
2011-09-18 18:53 ` Markus Mottl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).