user1002430
user1002430

Reputation:

How to ignore HLint's arrow hints?

I use HLint on my Haskell code, but not all the warnings/errors are very useful. In particular, the arrow hints because I never use arrows.

How do I get HLint to ignore all the arrow hints?

Upvotes: 6

Views: 653

Answers (1)

bheklilr
bheklilr

Reputation: 54068

For example, if you had the code:

map (\a -> (head a, length a)) someList

HLint would print out:

Warning: Use &&&
Found:
    \a -> (head a, length a)
Why not:
    head Control.Arrow.&&& length

Then you could ignore this by adding:

{-# ANN module "HLint: ignore Use &&&" #-}

At the top of your file. Alternative, you could create a file ana.hlint containing:

ignore "Use &&&"

Then use hlint as:

> hlint --hint=ana.hlint source_code.hs

Upvotes: 6

Related Questions