From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.0 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id E4052BB84 for ; Sat, 29 Nov 2008 18:17:33 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiQCACcIMUlDww/TmWdsb2JhbACOJYUjAQEBAQEICwoHEa5LizkFAgGCeg X-IronPort-AV: E=Sophos;i="4.33,687,1220220000"; d="scan'208";a="31980301" Received: from web111514.mail.gq1.yahoo.com ([67.195.15.211]) by mail4-smtp-sop.national.inria.fr with SMTP; 29 Nov 2008 18:17:33 +0100 Received: (qmail 65473 invoked by uid 60001); 29 Nov 2008 17:17:31 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=sG7BAhZ3uZMF+cqsEsh3O0S1/ymUsaLH824JM0lw39HRCeUunSvQi32mIYlRkL4U2iHTnOs2oWUggVGLEas4gH6p4HIziCbVDtZv4C92V1/kO1YAJ/LEVbKZIVen3ZJWNUMyNXJI8ms+ayuGOKuRD7YhT8akLU4bKVRZa1iO1ok=; X-YMail-OSG: csDz_60VM1kmwg4o0Vd2qTiSVoOqPx4JXn6dL2144qqEZGspjGvCVheFDsZ0Dh9X5uOeNrpbQh718j9khXcmulWafASVlbqm08nsF_PD0cxYpNvYjMnQ_8IjabopnH428RcS9jTr6jBblL6K49YE56tAHt270cjMTgBJHIfv Received: from [213.205.70.212] by web111514.mail.gq1.yahoo.com via HTTP; Sat, 29 Nov 2008 09:17:31 PST X-Mailer: YahooMailWebService/0.7.260.1 Date: Sat, 29 Nov 2008 09:17:31 -0800 (PST) From: Dario Teixeira Subject: Re: [Caml-list] Issues with Sexplib (#1) To: Till Varoquaux Cc: caml-list@yquem.inria.fr In-Reply-To: <9d3ec8300811290901l4d2596a9mef88e5f0f4bcb956@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <778325.65397.qm@web111514.mail.gq1.yahoo.com> X-Spam: no; 0.00; bug:01 camlp:01 sexp:01 cheers:01 wrote:01 caml-list:01 types:05 problem:05 i'd:06 extension:06 undesirable:07 phantom:07 practice:09 feature:09 wondering:09 Hi, > 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. Cheers, Dario Teixeira =0A=0A=0A