caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Markus Mottl <markus.mottl@gmail.com>
To: Michael Ekstrand <michael@elehack.net>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Bug in sexplib 7.0.4?
Date: Mon, 3 Oct 2011 11:30:33 -0400	[thread overview]
Message-ID: <CAP_800oncPw=dma9CRLVE3VF5hMrrX2XCDcGEV-vyKvuZm+YBQ@mail.gmail.com> (raw)
In-Reply-To: <4E89C577.5040500@elehack.net>

On Mon, Oct 3, 2011 at 10:23, Michael Ekstrand <michael@elehack.net> 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


  reply	other threads:[~2011-10-03 15:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-03 14:23 Michael Ekstrand
2011-10-03 15:30 ` Markus Mottl [this message]
2011-10-03 15:47   ` Michael Ekstrand
2011-10-03 16:06     ` Markus Mottl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAP_800oncPw=dma9CRLVE3VF5hMrrX2XCDcGEV-vyKvuZm+YBQ@mail.gmail.com' \
    --to=markus.mottl@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=michael@elehack.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).