[darcs-devel] [issue1511] Replace tests/haskell_policy.sh with hlint

twb1 bugs at darcs.net
Wed Aug 5 01:50:11 UTC 2009

New submission from twb1 <twb at cybersource.com.au>:

Ganesh write:
> We need to sort out haskell_policy, the ratification of readFile all
> over the place is just silly. Replacing it with hlint as has been
> suggested sounds like a very good idea.

The tests/haskell_policy.sh script is a historical in-house utility
for catching gotchas that have caused us problems in the past.

The problem is that this script doesn't have a Haskell parser, so it
cannot distinguish between e.g. use of Prelude.readFile (bad) and the
readFile of other modules (OK).  This results in whitelist comments:

    -- ratify readFile: haskell_policy is stupid.

There is a third-party tool called hlint[0] which seems like an ideal
replacement for haskell_policy.  The maintainer is happy to work with
us if hlint needs "extra smarts" to be useful for us.

This has been discussed earlier on the mailing list, but it seems no
BTS ticket was created.  Early messages in that thread have these

    <3063erpba3.fsf_-_ at gmail.com>
    <b97f58860906200205w5c6048acrd299c797125738f1 at mail.gmail.com>
    <87ocsjz294.fsf_-_ at mornfall.net>

The work to resolve this task is: 1) make sure that hlint can test
everything that haskell_policy tests; 2) replace haskell_policy's
innards with calls to hlint.

[0] http://hackage.haskell.org/package/hlint

messages: 8007
nosy: dmitry.kurochkin, kowey, simon, thorkilnaur, twb1
status: unread
title: Replace tests/haskell_policy.sh with hlint

Darcs bug tracker <bugs at darcs.net>

More information about the darcs-devel mailing list