[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: geneweb and ocaml 3.07 : help.. :-)



On Fri, Oct 03, 2003 at 07:01:23PM +0200, Christian Perrier wrote:
> 
> Well, as some of you may know, I'm not an ocaml expert...I'm even not
> a coding expert, by the way.
> 
> I maintain the geneweb package because it's part of my hobby,
> mostly. Also because I think I can make good work with it as long as
> it does not invlove digging in the dirt^W code.
> 
> So I'm needing some Ocaml competences for helping me.
> 
> With ocaml 3.07 release, the geneweb package does not compile from
> sources anymore.
> 
> This is probably trivial, but I cannot handle this by myself.
> 
> Here are the symptoms :
> 
> camlp4r pa_ifdef.cmo -DUNIX -o wserver.ppi wserver.mli
> ocamlc.opt -warn-error A  -I `camlp4 -where` -c -intf wserver.ppi
> File "wserver.mli", line 24, characters 15-46:
> The type constructor format expects 3 argument(s),
> but is here applied to 4 argument(s)
> make[2]: *** [wserver.cmi] Erreur 2
> 
> And the offending code :
> 
> ifdef OCAML_307 then
> value wprint : format 'a out_channel unit unit -> 'a
> else
> value wprint : format 'a out_channel unit -> 'a;
>     (* To be called to print page contents. *)
>  
> (you will notice the possible OCAML_307 define)
> 
> I tried to compile with -DOCAML_307 but the same happens. Probably
> because the define is implicit when camlp4r is the 3.07 version.
> 
> The only way to get through this is by commenting stuff :
> 
> (* ifdef OCAML_307 then
> value wprint : format 'a out_channel unit unit -> 'a
> else *)
> value wprint : format 'a out_channel unit -> 'a;
>     (* To be called to print page contents. *)
>  
> 
> But this is probably silly.. :-)
> 
> I could ask Daniel de Rauglaudre, upstream author, but I prefer asking
> here first as Daniel is currently very busy and I'd prefer trying this
> as a last option....

Well, i don't really know, but it seems to me that the whole of the
OCAML_3.07 code is making wrong assumption on what was supposed to be
ocaml 3.07, probably using an old version of ocaml cvs or something.

I would remove all the OCAML_307 stuff, or replace it by OCAML_307_BAD
or something. Altough, maybe the place in src/argl.ml could be kept, i
don't know.

The problem seems to be related on the new format type, which i remember
was indeed incompatible some time back in the CVS, but apparently this
was reverted to keep source level compatibility, and there is no mention
of it in the Changes file.

So, i would remove each mention of it, except for the src/argl.ml file,
which seems to build fine with it.

Friendly,

Sven Luther



Reply to: