Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to ignore HLint's arrow hints?

Tags:

haskell

lint

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?

like image 578
Ana Avatar asked Apr 01 '15 22:04

Ana


Video Answer


1 Answers

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
like image 133
bheklilr Avatar answered Sep 21 '22 12:09

bheklilr