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

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



Christian Perrier <bubulle@debian.org> writes:

> 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 should change this to :

ifdef OCAML_307 then
value wprint : format4 'a out_channel unit unit -> 'a
else
value wprint : format 'a out_channel unit -> 'a;
    (* To be called to print page contents. *)

or (even simpler) :

value wprint : format 'a out_channel unit -> 'a;

(removing the ifdef OCAML_307).

the fact is the format type became incompatible in the cvs version,
then as come back to normal, while the format4 take the place of the
temporary incompatible format type.


>  
> (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.. :-)

Well, just remove it.

>
> 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....

you should tell upstream that is code does not compile, it may not be
aware of it.


-- 
Rémi Vanicat
remi.vanicat@laposte.net



Reply to: