I'm trying to disable some warnings that HLint is giving me. According to docs I should be able to add a pragma to the top of my file. So I tried the following:
{-# HLINT ignore #-}
module Main where
Which however gives me an error when running stack build:
/Users/nene/somedir/src/Main.hs:1:1: warning: [-Wunrecognised-pragmas]
Unrecognised pragma
|
1 | {-# HLINT ignore #-}
| ^^^
Seems like the pragma actually works in my editor (VSCode with "Haskell" extension), but is not recognized when running stack.
If you want to use a pragma without any warnings, you can use the
ANNpragma like this:However I would recommend using a regular comment instead of a pragma:
I prefer regular comments because they don't have weird rules like pragmas do. In fact the documentation notes: