[Haskell-cafe] Re: [Haskell] ANN: HLint 1.0
hpacheco at gmail.com
Sat Dec 20 06:42:30 EST 2008
I have run HLint against my libraries and found lots of suggestions, mainly
This is what I suggest from my experience:
. a suggestion for a rule: dollar eta: f $ x -> f x. some parser errors I
encountered: import Data.Generics hiding ((:*:))
type instance Rep Id x =
On Sat, Dec 20, 2008 at 10:21 AM, Hugo Pacheco <hpacheco at gmail.com> wrote:
> I noticed that you convert point-wise into point-free.Perhaps you could
> add some point-free transformations to remove redundancy in certain cases.
> Is that a goal of the library?
> On Sat, Dec 20, 2008 at 9:55 AM, Neil Mitchell <ndmitchell at gmail.com>wrote:
>> I am pleased to announce HLint, a tool for making suggestions to
>> improve your Haskell code. Previously this tool was called Dr Haskell
>> and depended on a working installation of Yhc - both of those have now
>> changed. HLint requires GHC 6.10*, and to install simply type:
>> cabal update && cabal install hlint
>> If you haven't yet installed the cabal command, instructions are here:
>> As an example of what HLint does, running "hlint darcs-2.1.2" over the
>> latest stable release of darcs gives 385 suggestions, including:
>> darcs-2.1.2\src\CommandLine.lhs:46:1: Use a string literal
>> [' ', '\t', '"', '%']
>> Why not:
>> " \t\"%"
>> darcs-2.1.2\src\CommandLine.lhs:49:1: Eta reduce
>> quotedArg ftable
>> = between (char '"') (char '"') $ quoteContent ftable
>> Why not:
>> quotedArg = between (char '"') (char '"') . quoteContent
>> darcs-2.1.2\src\CommandLine.lhs:94:1: Use concatMap
>> concat $ map escapeC s
>> Why not:
>> concatMap escapeC s
>> To see all the hints in a nice interactive document visit
>> (recommended if you are thinking of trying out hlint)
>> All necessary links, including a manual, hackage links, bug tracker
>> and source code can be found from the tool website:
>> Acknowledgements: Niklas Broberg and the haskell-src-exts package have
>> both been very helpful. The darcs users mailing list gave many good
>> suggestions which I've incorportated.
>> Please direct any follow up conversations to haskell-cafe@
>> * Why GHC 6.10? View patterns.
>> Haskell mailing list
>> Haskell at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe