[darcs-users] darcs patch: Re-implement haskell_policy in terms of hlint.

Gwern Branwen gwern0 at gmail.com
Tue Sep 1 14:55:36 UTC 2009


On Tue, Sep 1, 2009 at 10:44 AM, Petr Rockai<me at mornfall.net> wrote:
> Gwern Branwen <gwern0 at gmail.com> writes:
>> Are there that many double or triple uses of the dangerous functions
>> in Darcs code? (Is the ratified module technique even foolproof? It
>> would seem as vulnerable to someone using the
>> Ratified.getContents/whatever 'just to get it to compile' as to
>> someone just reusing the function in a ignored module.)
> You are missing the point. If you disable a module from checks, it'll be easy
> to add a new bad use of a banned function unwittingly to that module.

I see the point fine; you are guarding against a small edgecase that I
don't think will ever happen, using a mechanism that is quite complex
and unusual. I don't think the former is worth the latter - given that
the banned functions are things like 'hGetContents' which are usually
used only once per executable...

>> Which is uglier, risking the small chance of missing a double use, or
>> supporting this ratified module stuff forever?
> Why forever?

Well, what do you see replacing your ratified module thingy? When?

-- 
gwern


More information about the darcs-users mailing list