[darcs-users] haskell_policy and hlint

Neil Mitchell ndmitchell at gmail.com
Thu Aug 6 08:00:42 UTC 2009


Hi

> [03:35 AM] 0Mb$ nano foo && cat foo foo.hs && echo
> ignore "Eta reduce" = ""
> error = Prelude.readFile ==> Data.ByteString.readFile
> main = Prelude.readFile "foo" >> return ()
> [03:36 AM] 0Mb$ hlint --hint=foo foo.hs hlint: Prelude.head: empty list
>
> If I specify
>  error = Prelude.readFile ==> Data.ByteString.readFile
>
> I crash darcs hlint with head. If the periods are replaced with, say,
> underscores, I get the correct suggestion.

I'll fix these bugs and release a new version. Sorry for the bugs!

> Finally, there's no way apparently to warn about whitespace, which is the
> third and last thing haskell_policy does (it warns about readFile,
> hGetContents, and tabs). This we may simply have to forget about.

Why not -fwarn-tabs ? It's in GHC already. Although I'm not totally
opposed to adding checks for things like trailing white space, use of
tabs etc.

Thanks

Neil


More information about the darcs-users mailing list