darcs

Issue 1511 Replace tests/haskell_policy.sh with hlint

Title Replace tests/haskell_policy.sh with hlint
Priority feature Status resolved
Milestone Resolved in
Superseder Nosy List Serware, darcs-devel, dmitry.kurochkin, kowey, stephen, thorkilnaur, twb
Assigned To
Topics Devel

Created on 2009-08-05.01:50:11 by twb1, last changed 2009-10-23.23:31:33 by admin.

Messages
msg8007 (view) Author: twb1 Date: 2009-08-05.01:50:08
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
Message-IDs:

    <3063erpba3.fsf_-_@gmail.com>
    <b97f58860906200205w5c6048acrd299c797125738f1@mail.gmail.com>
    <87ocsjz294.fsf_-_@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
msg8015 (view) Author: kowey Date: 2009-08-06.12:13:11
Assigning to Gwern as I understand he's working on it
msg8863 (view) Author: kowey Date: 2009-09-24.06:08:10
Fixed by

Fri Aug  7 08:57:36 CEST 2009  Petr Rockai <me@mornfall.net>
  * Re-implement haskell_policy in terms of hlint.
  
  This also comes with a change to the ratification mechanism, which now uses a
  separate Ratified module, from which you have to import the unsafe
  functions. Requires a recent hlint.

with thanks to Gwern for initial implementation
History
Date User Action Args
2009-08-05 01:50:11twb1create
2009-08-06 07:21:46gwernsetnosy: + gwern
2009-08-06 12:13:15koweysetstatus: unread -> has-patch
priority: feature
nosy: kowey, simon, thorkilnaur, gwern, dmitry.kurochkin, twb1
messages: + msg8015
topic: + Confirmed
assignedto: gwern
2009-08-06 13:38:02adminsetnosy: + Serware, twb, stephen, - gwern, twb1
2009-08-25 17:46:36adminsetnosy: + darcs-devel, - simon
2009-08-27 14:21:04adminsetnosy: kowey, darcs-devel, twb, thorkilnaur, dmitry.kurochkin, Serware, stephen
2009-09-02 20:17:37koweysettopic: + Devel, - Confirmed
nosy: kowey, darcs-devel, twb, thorkilnaur, dmitry.kurochkin, Serware, stephen
2009-09-24 06:08:13koweysetstatus: has-patch -> resolved
nosy: kowey, darcs-devel, twb, thorkilnaur, dmitry.kurochkin, Serware, stephen
messages: + msg8863
assignedto: gwern ->
2009-10-23 22:45:58adminsetnosy: + serware, - Serware
2009-10-23 23:31:33adminsetnosy: + Serware, - serware