English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
RE: [Caml-list] Haskell features in O'Caml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-09-25 (09:15)
From: Remi VANICAT <vanicat@l...>
Subject: Re: [Caml-list] Haskell features in O'Caml
Christian.Schaller@cert.siemens.de writes:

> oops, yes you're right.  I was trying it that way:
> * create test.ml
> * compile it => test.cm[io] file
> * now create test.mli
> * compile test.ml again
> and no error message will be issued, since test.cmi is existing, though has
> totally different signature.  This problem does also occur whenever the
> interface is changing!  There seems to be no check if interface source is
> newer than the compiled one (I'm using OCaml 3.02 @ cygwin without tk;
> Win2k, English, SP2).

You should use make for check when source file are newer than compiled

>   It gets also interesting, when you are using -i to see the signature of
> your definitions.  A correct test.mli will yield "val f : int -> int",
> however compiling the definition will yield "val f : 'a -> 'a".

it depend of what you want, int -> int is as correct as 'a -> 'a.

Rémi Vanicat
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr