English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Issues with Sexplib (#1)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-11-29 (17:17)
From: Dario Teixeira <darioteixeira@y...>
Subject: Re: [Caml-list] Issues with Sexplib (#1)

> This is not really a bug; I'd qualify this as an "undesirable"
> feature: sexplib erases type information; for instance the
> representation of None* will always be the same and therefore
> will be desexpable to any other option type. You may also note
> that some other type have compatible representations. In
> practice it would be really hard for a camlp4 extension to keep
> track of types. In you case you could use custom converters and
> save the phantom type in the sexp.

Yes, I figured as much (see the last paragraph of my original
message).  I was just wondering if there was already a canned
solution to this sort of problem (or one in the works), before
I wrote a custom converter.

Dario Teixeira