Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Francois Berenger <berenger@riken.jp>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Warning 20: Unused function argument
Date: Mon, 25 Mar 2013 13:58:22 +0900	[thread overview]
Message-ID: <514FD96E.9010209@riken.jp> (raw)
In-Reply-To: <C1023AE6-2F13-4288-A76A-DC118AF9E908@math.nagoya-u.ac.jp>

On 03/22/2013 07:18 PM, Jacques Garrigue wrote:
> On 2013/03/22, at 18:02, Francois Berenger <berenger@riken.jp> wrote:
>
>> Hello,
>>
>> I understand it is turned off by default.
>>
>> I am a bit surprised as it is as important
>> to me as an unused variable, which triggers a warning
>> by default.
>
> Actually, this whole thread is based on a misunderstanding.
> This waning is enabled by default (as you can see with ocaml -help),
> but, as Gabriel pointed, it is about arguments passed to functions,
> not about formal parameters.

So, there is no warning about unused formal parameters?

After some large refactoring of some code, I may have some.

If I understand correctly:

# ocaml -w +20
# let test_w20 x y z = x, y;;
val test_w20 : 'a -> 'b -> 'c -> 'a * 'b = <fun>
# test_w20 1 2 3;;
- : int * int = (1, 2)

Produces no warning.

Thanks,
F.


  reply	other threads:[~2013-03-25  4:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22  9:02 Francois Berenger
2013-03-22  9:05 ` Gabriel Scherer
2013-03-22  9:14   ` rixed
2013-03-22  9:16   ` Francois Berenger
2013-03-22  9:39     ` Gabriel Scherer
2013-03-22 10:18 ` Jacques Garrigue
2013-03-25  4:58   ` Francois Berenger [this message]
2013-03-25  6:08     ` Jacques Garrigue

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=514FD96E.9010209@riken.jp \
    --to=berenger@riken.jp \
    --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