[Haskell-cafe] Re: [Haskell] ANN: HLint 1.0
Hugo Pacheco
hpacheco at gmail.com
Sat Dec 20 06:42:30 EST 2008
Hi again,
I have run HLint against my libraries and found lots of suggestions, mainly
excessive brackets.
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 =
x
Cheers,
hugo
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?
>
> Cheers,
> hugo
>
>
> On Sat, Dec 20, 2008 at 9:55 AM, Neil Mitchell <ndmitchell at gmail.com>wrote:
>
>> Hi,
>>
>> 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:
>> http://ghcmutterings.wordpress.com/2008/11/10/bootstrapping-cabal-install/
>>
>> 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
>> Found:
>> [' ', '\t', '"', '%']
>> Why not:
>> " \t\"%"
>>
>> darcs-2.1.2\src\CommandLine.lhs:49:1: Eta reduce
>> Found:
>> 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
>> Found:
>> concat $ map escapeC s
>> Why not:
>> concatMap escapeC s
>>
>> To see all the hints in a nice interactive document visit
>> http://www-users.cs.york.ac.uk/~ndm/hlint/hlint-report.htm
>> (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:
>> http://www-users.cs.york.ac.uk/~ndm/hlint/
>>
>> 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@
>>
>> Thanks
>>
>> Neil
>>
>> * Why GHC 6.10? View patterns.
>> _______________________________________________
>> Haskell mailing list
>> Haskell at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell
>>
>
>
>
> --
> www.di.uminho.pt/~hpacheco
>
--
www.di.uminho.pt/~hpacheco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20081220/68afee49/attachment.htm
More information about the Haskell-Cafe
mailing list