[darcs-devel] Style issues [was: should we import...]
John Meacham
john at repetae.net
Tue May 24 14:53:45 PDT 2005
On Tue, May 24, 2005 at 11:45:44PM +0200, Juliusz Chroboczek wrote:
> >> import FileName ( FileName, fn2fp, fp2fn, norm_path )
> >>
> >> I like the latter, since it makes it very easy to see which module a given
> >> function is from,
>
> I agree. Another point is that importing whole modules tends to cause
> shadowing of symbols, which David's fascist makefiles forbid (-Wall -Werror).
>
> While we're on the subject of style, there is one thing that's
> enforced by the current makefiles that I find annoying: the fact that
> I cannot name unused parameters in functions. For example, I cannot
> write something like
>
> foo x [y] = x + y
> foo x list = x
>
> because the build will break with ``list'' being undefined. Of
> course, I can write
>
> foo x _ = x
>
> but I find that much less perspicuous.
You can do this
foo x [y] = x + y
foo x _list = x
any name starting with an underscore doesn't generate an unused
identifier warning.
John
--
John Meacham - ⑆repetae.net⑆john⑈
More information about the darcs-devel
mailing list