From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q27HAcex008643 for ; Wed, 7 Mar 2012 18:10:39 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlABAFmWV09KfVK2kGdsb2JhbABEhTSvYAgiAQEBAQkJDQcUBCOCCgEBAQQSAg8dARsdAQMMBgMCCw0CAiYCAiEBAREBBQEcBhMih2abcQqLKEyCcYU/P4h0AQULgSSICoYggRYEiFKMb4shgxg9hCI X-IronPort-AV: E=Sophos;i="4.73,545,1325458800"; d="scan'208";a="134886487" Received: from mail-we0-f182.google.com ([74.125.82.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 07 Mar 2012 18:10:28 +0100 Received: by werl4 with SMTP id l4so6983122wer.27 for ; Wed, 07 Mar 2012 09:10:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=WLXkiXVWRGyJ0hofIJjVcLrcBh1Ob5oiGj0M67i35sk=; b=jbdlqVqwaUFGNDpGwk/gELtXBgyqLl8ym8H67L2k6JMVAoScrR+89FaQzVM1MK2LOk uoFDfPbV7Ovz/FjWNuzoLIpy5cVx2VUWDVy54o9V3bA9u0NOyGnM6gaT/V0FcKXyjI1c WiWIAj6yAV3iR0VGtI+gSSSWTWCQlat3dxvl7Uy75sI/leejz5f94qnjq38P8V2xT3Op mmjrfJJpL4Lf7ELykiCtbfuAe/uY4xqRSEF+iN8QdQsAW3fKUDnrP5ODKhjUXoMXg8RR wukhsX2MStNRGs4ImXl03mU5aP2WgL9mwSYzjpjgXAQU73jifi4FBy6dMTQm/9mBCT9K W+hQ== MIME-Version: 1.0 Received: by 10.180.19.37 with SMTP id b5mr5506129wie.9.1331140227932; Wed, 07 Mar 2012 09:10:27 -0800 (PST) Received: by 10.180.78.102 with HTTP; Wed, 7 Mar 2012 09:10:27 -0800 (PST) In-Reply-To: <4F579054.60203@gmail.com> References: <4F574B3C.5000207@gmail.com> <4F579054.60203@gmail.com> Date: Wed, 7 Mar 2012 12:10:27 -0500 Message-ID: From: Markus Mottl To: =?UTF-8?B?TWF0ZWogS2/FocOtaw==?= <5764c029b688c1c0d24a2e97cd764f@gmail.com> Cc: Yaron Minsky , Caml List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id q27HAcex008643 Subject: Re: [Caml-list] concerning using of `deriving' syntactic plugin On Wed, Mar 7, 2012 at 11:44, Matej Košík <5764c029b688c1c0d24a2e97cd764f@gmail.com> wrote: > I have found one (I guess unnecessary) disadvantage over `deriving'. > If you process your *.ml file with sexplib/bin_prot preprocessor, you > have to append "with ..." suffix to every type definition, otherwise you > will get a an error report from the preprocessor. `Deriving' does not > force you to do that. You can annotate only those type definitions, > which for you makes sense to annotate. I'm not sure what the perceived problem is, but there should be no need to annotate all type definitions. It should suffice to annotate those for which converters are needed. This, of course, means that any types that a type definition is referring to will also need annotations (or hand-written conversion functions). Regards, Markus -- Markus Mottl        http://www.ocaml.info        markus.mottl@gmail.com