I have the following Visual Studio Code extensions for Haskell installed:
If I use elem
in a prefix form:
(elem n primes)
I get a blue squiggly that suggests the infix form:
Is there a way to turn off just this particular hlint rule, hlint(refact:Use infix)
just for this file or project?
Yes!
For a single source file, add one of these to the top of the file:
{-# ANN module "HLint: ignore Use infix" #-}
{-# HLINT ignore "Use infix" #-}
{- HLINT ignore "Use infix" -}
For the entire project, create a file .hlint.yaml
as follows:
- ignore: {name: Use infix}
You can also run hlint --default > .hlint.yaml
from a terminal, which will create a .hlint.yaml
file ignoring any hints currently uncorrected in your project.
These are not VS Code specific - they apply wherever hlint
is used.
For more information see the HLint manual.
Happy Haskelling!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With