caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <xavier.leroy@inria.fr>
To: Basile STARYNKEVITCH <basile@starynkevitch.net>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] is ocaml 3.07 object-file compatible with 3.06?
Date: Fri, 25 Jul 2003 10:56:32 +0200	[thread overview]
Message-ID: <20030725105632.A31893@pauillac.inria.fr> (raw)
In-Reply-To: <16159.50395.271827.595003@hector.lesours>; from basile@starynkevitch.net on Thu, Jul 24, 2003 at 01:36:59PM +0200

> Is the beta (or the final, when available) release of 3.07 compatible
> at the the object level with 3.06? In other words, if my application
> uses a lot of (findlib managed) third parties' libraries, do I need to
> recompile all of them, or can I use ocaml 3.07 to link with libraries
> compiled with ocaml 3.06?

You need to recompile all third-party libraries.  The format of Caml
compiled files didn't change, but the standard library interfaces
(Pervasives, etc) against which these libs were compiled changed
between 3.06 and 3.07beta.  And you might have to recompile again when
3.07 is out.

If you try to use these libraries without recompiling them, you'll get
plenty of "Files xxx and yyy make inconsistent assumptions about
module Z".

That should explain why we really need some kind of library packaging
tools: so that such recompilations can be performed automatically by
the packaging tool.

> BTW, I did search (the 'format4' word) in the beta documentation of
> 3.07 and did not found a clear explanation of the long awaited
> ('a,'b,'c,'d) Pervasives.format4 type - I would like a *detailed*
> explanation of what 'a 'b 'c 'd type variables stand for (even if I do
> guess partly what they are for).

A *detailed* explanation would be one page of inference rules,
paraphrasing the code in Typecore.type_format.  I'm not sure this will
really help...  

However, it's easy to explain the difference between the old type
('a,'b,'c) format and the new type ('a,'b,'c1,'c2) format4:
in type format, 'c is both the type of the final result of the
printf-like function (e.g. unit for fprintf and string for sprintf)
*and* the result type for the function parameters corresponding to %a
and %t formats.  In type format4, these two roles are divided between two
independent variables 'c1 and 'c2.  There are cases (as with kprintf)
where different types are required for these two roles.

> Are there any hints for using format4 strings with localisation (ie a
> wrapper to gettext)?

The same hints that I gave in an earlier post in terms of the
"format" type apply equally well to the "format4" type.

- Xavier Leroy

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2003-07-25  8:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-24 11:36 Basile STARYNKEVITCH
2003-07-25  8:56 ` Xavier Leroy [this message]
2003-07-25  9:07   ` Stefano Zacchiroli
2003-07-25 16:38 ` Debian User
2003-07-25 18:05   ` Michal Moskal
2003-07-25 22:32     ` Sylvain LE GALL
2003-08-06 11:24       ` Michal Moskal
2003-08-06 17:07         ` Sylvain LE GALL

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=20030725105632.A31893@pauillac.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=basile@starynkevitch.net \
    --cc=caml-list@inria.fr \
    /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).