From: John Carr <jfc@mit.edu>
To: AUGER Cedric <Cedric.Auger@lri.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list]Warning 20: this argument will not be used by the function.
Date: Tue, 30 Aug 2011 18:31:57 -0400 [thread overview]
Message-ID: <201108302231.p7UMVvoB024895@outgoing.mit.edu> (raw)
In-Reply-To: <20110830132737.78b7a08e@lri.fr>
> Warning 20: this argument will not be used by the function.
See also warning 21:
# let f () = assert false; 0;;
Warning 21: this statement never returns (or has an unsound type.)
val f : unit -> int = <fun>
Assert behaves like a function with type bool -> 'a. The return type is
an unconstrained type, a type variable not mentioned on the left hand
side of the arrow. Functions with such type never return or have
unsound type. Your example used Obj.magic and has unsound type.
A more verbose version of warning 20 would explain
Warning 20: this argument will not be used by the function (or the function has an unsound type).
--John Carr (jfc@mit.edu)
next prev parent reply other threads:[~2011-08-30 22:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-30 11:27 AUGER Cedric
2011-08-30 22:31 ` John Carr [this message]
2011-08-30 23:40 ` Philippe Wang
2011-08-31 7:12 ` Esther Baruk
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=201108302231.p7UMVvoB024895@outgoing.mit.edu \
--to=jfc@mit.edu \
--cc=Cedric.Auger@lri.fr \
--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