Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Value shadowing
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-08-13 (11:51)
From: blue storm <bluestorm.dylc@g...>
Subject: Re: [Caml-list] Value shadowing
Here is a draft of camlp4 extension warning on value shadowing :

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 file), your input gives the
warning :
<W> File "", line 4, characters 6-8: shadowing binding 'xs' from
File "", 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.