[Haskell-beginners] HLint fails to give suggestions

Darren Grant dedgrant at gmail.com
Wed May 15 20:43:03 CEST 2013


David answered my question.



On Wed, May 15, 2013 at 11:27 AM, David McBride <toad3k at gmail.com> wrote:

> Hlint doesn't compile your code.  It only looks for common patterns in
> code that are usually bad.  It is going on the assumption that your
> code already compiled and you are just looking for some advice on
> refactoring.
>
> 234234 = do
>   return 1
>
> gives
>
> Blah5.hs:2:10: Error: Redundant do
> Found:
>   do return 1
> Why not:
>   return 1
>
>
> On Wed, May 15, 2013 at 2:04 PM, irfan hudda <huddairfan at gmail.com> wrote:
> > I install HLint via cabal (output http://hpaste.org/88021)
> > To check if it was working I used following code
> >
> > fun1 :: Int -> String
> > fun1 1 = "hell"
> > fun1 2 = 3
> >
> > and ran HLint on it
> > $ ~/.cabal/bin/hlint hlint_test.hs
> > No suggestions
> >
> > and it ouputs no suggestions
> > any ideas?
> >
> > Additionally
> > $ ~/.cabal/bin/hlint -v
> > HLint v1.8.45, (C) Neil Mitchell 2006-2012
> >
> >
> >
> > _______________________________________________
> > Beginners mailing list
> > Beginners at haskell.org
> > http://www.haskell.org/mailman/listinfo/beginners
> >
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130515/e10eb018/attachment.htm>


More information about the Beginners mailing list