Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] is ocaml 3.07 object-file compatible with 3.06?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] is ocaml 3.07 object-file compatible with 3.06?
> 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