Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "blue storm" <bluestorm.dylc@gmail.com>
To: "David Allsopp" <dra-news@metastack.com>
Cc: "OCaml List" <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Value shadowing
Date: Wed, 13 Aug 2008 13:50:58 +0200	[thread overview]
Message-ID: <527cf6bc0808130450v70351c6vab0c961cbc6a61c8@mail.gmail.com> (raw)
In-Reply-To: <9E2C98C8798A487DAE77F20A9DC4F1E8@countertenor>

[-- Attachment #1: Type: text/plain, Size: 628 bytes --]

Here is a draft of camlp4 extension warning on value shadowing :
  http://bluestorm.info/camlp4/dev/pf_shadow/list.php

You can use it as a preprocessor to your source file, and it will raise
warnings on value shadowing.
For example (more examples in the test.ml file), your input gives the
warning :
<W> File "input.ml", line 4, characters 6-8: shadowing binding 'xs' from
File "input.ml", line 2, characters 8-10

Recursive bindings are handled, but classes, types and modules are not : it
is a reasonable proof of concept, and if somebody is interested in more
exhaustiveness, i (or whoever) could probably extend it easily.

[-- Attachment #2: Type: text/html, Size: 870 bytes --]

      parent reply	other threads:[~2008-08-13 11:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-13  8:54 David Allsopp
2008-08-13  9:15 ` [Caml-list] " Brighten Godfrey
2008-08-13  9:56   ` David Allsopp
2008-08-13 10:49     ` [Caml-list] Value shadowing (tangent) Brighten Godfrey
2008-08-13 11:04       ` David Allsopp
2008-08-13 11:04       ` Brighten Godfrey
2008-08-13 11:17         ` Daniel Bünzli
2008-08-13 23:05           ` Stefano Zacchiroli
2008-08-13 23:33             ` Daniel Bünzli
2008-08-13 11:05       ` Vincent Hanquez
2008-08-16 20:02         ` Pierre Etchemaïté
2008-08-17  8:07           ` David Allsopp
2008-08-17 10:28             ` Pierre Etchemaïté
2008-08-13 10:33   ` [Caml-list] Value shadowing Jim Farrand
2008-08-13 10:12 ` Richard Jones
2008-08-13 11:04   ` David Allsopp
2008-08-13 12:26     ` blue storm
2008-08-13 15:03     ` Mauricio Fernandez
2008-08-13 11:50 ` blue storm [this message]

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=527cf6bc0808130450v70351c6vab0c961cbc6a61c8@mail.gmail.com \
    --to=bluestorm.dylc@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=dra-news@metastack.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