[darcs-users] Re: haskell_policy and hlint

Petr Rockai me at mornfall.net
Sat Jun 20 09:24:39 UTC 2009


trentbuck at gmail.com (Trent W. Buck) writes:
> It seems to me that hlint does basically the same thing, but it has a
> different set of rules: it complains about some things we don't care
> about, and doesn't complain about some things we DO care about.

> Rather than scrapping it, could haskell_policy be subsumed by hlint and
> some Darcs-specific rules?

I approve of that. It doesn't immediately solve the scoping ignorance problem
of haskell_policy (unfortunately), but at least it's more flexible and less
broken. If anyone wants to look into replacing haskell_policy with hlint usage,
we would probably need a way to cut down the reported errors considerably (it
may be quite enough to run hlint as part of "cabal test", providing a
reasonable ignore list).

Also, getting some features into hlint would possibly help (like non-zero
return when errors are encountered and using zero for clean or
warnings-only). A way to describe module scoping in the rules language would
help a lot too (so we could say error = Prelude.readFile ==>
Data.ByteString.readFile and it would match all uses of readFile that come from
a Prelude import).

Neil, what do you think? Would you be willing to implement these things in
hlint? Or if not, would you accept patches for them?

Yours,
   Petr.

-- 
Petr Ročkai | http://web.mornfall.net
A physicist is an atom's way of knowing about atoms. (George Wald)


More information about the darcs-users mailing list