From: Vitaly Lugovsky <vsl@ontil.ihep.su>
To: Pixel <pixel@mandrakesoft.com>
Cc: <caml-list@inria.fr>
Subject: Re: [Caml-list] unused variables warning
Date: Sun, 29 Apr 2001 12:15:24 +0400 (MSD) [thread overview]
Message-ID: <Pine.LNX.4.30.0104291211000.13483-100000@ontil.ihep.su> (raw)
In-Reply-To: <20010428095737.206C55722@leia.mandrakesoft.com>
On Sat, 28 Apr 2001, Pixel wrote:
> Is there any way to ask ocamlc for an "unused variable" warning?
>
> let f x =
> let x' = <...> in
> x
>
> would issue something like
>
> File "test.ml", line 2, characters 3-18:
> Unused variable x'
It's "unused" and can be optimized out only when <...> is a pure
functional statement (not changing global state). There is no clean way to
figure this out, since we can use foreign functions, and "purity" is not
specified in a module signature. 'tis a very interesting suggestion:
specify pure functional and state-changing functions in signatures
(automaticaly or manualy), and use this info for a better optimizations.
-------------------
To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr
next prev parent reply other threads:[~2001-04-29 8:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-28 9:57 Pixel
2001-04-29 8:15 ` Vitaly Lugovsky [this message]
2001-04-29 9:58 ` Pixel
2001-04-29 13:06 ` Sven LUTHER
2001-04-29 13:14 ` Pixel
2001-04-29 10:14 ` Marcin 'Qrczak' Kowalczyk
2002-09-09 21:24 ` [Caml-list] " Pixel
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=Pine.LNX.4.30.0104291211000.13483-100000@ontil.ihep.su \
--to=vsl@ontil.ihep.su \
--cc=caml-list@inria.fr \
--cc=pixel@mandrakesoft.com \
/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