caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christian.Schaller@cert.siemens.de
To: caml-list@inria.fr
Subject: RE: [Caml-list] Haskell features in O'Caml
Date: Tue, 25 Sep 2001 00:51:55 +0200	[thread overview]
Message-ID: <4F8477CFC03A71499AD8DDA428F5E114037726@basecamp.mchp.siemens.de> (raw)

vanicat@labri.u-bordeaux.fr wrote:

> >   Since implementation is not automatically checked against 
> the interface
> > (or did I get something wrong?),
> 
> yes, you do:
> 
> test.ml :
> 
> let f x = x
> 
> test.mli :
> 
> val f : int -> float
> 
> $ ocamlc -c test.ml
> I/O error: test.cmi: No such file or directory
> $ ocamlc -c test.mli
> $ ocamlc -c test.ml
> The implementation test.ml does not match the interface test.cmi:
> Values do not match: val f : 'a -> 'a is not included in val 
> f : int -> float

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

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

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


             reply	other threads:[~2001-09-24 22:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-24 22:51 Christian.Schaller [this message]
2001-09-25  9:15 ` Remi VANICAT
  -- strict thread matches above, loose matches on Subject: below --
2001-09-24 16:26 Christian.Schaller
2001-09-24 19:53 ` Remi VANICAT
2001-09-23 23:25 Arturo Borquez
2001-09-22 14:56 Arturo Borquez
2001-09-23 16:08 ` Florian Hars
2001-09-23 16:21 ` Mattias Waldau
2001-09-23 17:50   ` Dave Mason
2001-09-24 11:14     ` Sven
2001-09-24 15:29       ` Brian Rogoff
2001-09-22 11:46 Steven Murdoch

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=4F8477CFC03A71499AD8DDA428F5E114037726@basecamp.mchp.siemens.de \
    --to=christian.schaller@cert.siemens.de \
    --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).