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 p93FUd80010824 for ; Mon, 3 Oct 2011 17:30:39 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At4AAPfTiU5KfVI0imdsb2JhbABBp3kIIgEBAQoJDQcSBiGBUwEBAQQSAiwBFAcdAQMMBgULDS4hAQERAQUBHAYTIqRTCotNglyEPj2IbgIEBocbBJNgih6Cdj2ECQ X-IronPort-AV: E=Sophos;i="4.68,479,1312149600"; d="scan'208";a="111562354" Received: from mail-ww0-f52.google.com ([74.125.82.52]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 03 Oct 2011 17:30:37 +0200 Received: by wwj40 with SMTP id 40so6784106wwj.9 for ; Mon, 03 Oct 2011 08:30:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=evXkTbRO53s9fcW4fa25tODud7s745yDOrL6wmMbVhM=; b=QJpNKmTu+opyXJqlkfUFXqKEJ8ggBd7Gxf9f8twM+tdx4DOEBxMYPtEwGOCZgaEEBd WWSKXDEH0wDTUfMam2zqM2dgHpudqg7otkCrzTL1uuVTbjSw9L6ofyEn7V73wzpldCyE PgjLi5NxlWpxl9fOE7c0+RbEUJqnErxV8Y+DM= MIME-Version: 1.0 Received: by 10.223.52.141 with SMTP id i13mr75469fag.74.1317655833770; Mon, 03 Oct 2011 08:30:33 -0700 (PDT) Received: by 10.152.19.198 with HTTP; Mon, 3 Oct 2011 08:30:33 -0700 (PDT) In-Reply-To: <4E89C577.5040500@elehack.net> References: <4E89C577.5040500@elehack.net> Date: Mon, 3 Oct 2011 11:30:33 -0400 Message-ID: From: Markus Mottl To: Michael Ekstrand Cc: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p93FUd80010824 Subject: Re: [Caml-list] Bug in sexplib 7.0.4? On Mon, Oct 3, 2011 at 10:23, Michael Ekstrand wrote: > I'm trying to build code against sexplib 7.0.4, and the code emitted by > the syntax extension has unqualified references to the base converters > like sexp_of_list and int_of_sexp. The result is that the sexplib-using > code fails to compile with undefined references. I've found this trying > to rebuild rpmdepsize, and also with some test code I have. > > Is this a bug in 7.0.4, or are there source-level changes required to > build against recent versions of sexplib? It feels more like a bug to > me, as I shouldn't need to open a module like Sexplib.Conv to make the > generated code work. This is indeed intended behavior, which is unfortunately not yet well-documented. The library used to generate code with hard-coded module paths to the standard conversion functions. This made it hard to override them. The new library therefore requires you to "open Sexplib.Std" (not Sexplib.Conv btw.) if you are happy with all standard converters. The effort is minimal, makes it explicit what conversion functions are being used, and overriding is as easy as (automatic) rebinding. Regards, Markus -- Markus Mottl        http://www.ocaml.info        markus.mottl@gmail.com