I'm trying to lint a file with ghc-mod. I know ghc-mod uses hlint for this and I know that hlint accepts arguments to modify the suggestions it reports. For instance, this works just fine:
eric@linux-epth:total-beginner-haskell$ hlint src/Borrower.hs --hint=Generalise
src/Borrower.hs:44:3: Suggestion: Use mappend
Found:
getName br ++
" (" `mappend` show (getMaxBooks br) `mappend` " books)"
Why not:
getName br `Data.Monoid.mappend`
(" (" `mappend` show (getMaxBooks br) `mappend` " books)")
1 hint
Here's the format ghc-mod requires for passing arguments to hlint:
Usage: ghc-mod lint [-h|--hlintOpt ARG] FILE
But none of the variations below produce the hint shown above:
eric@linux-epth:total-beginner-haskell$ ghc-mod lint -h hint=Generalise src/Borrower.hs
eric@linux-epth:total-beginner-haskell$ ghc-mod lint --hlintOpt hint=Generalise src/Borrower.hs
eric@linux-epth:total-beginner-haskell$ ghc-mod lint --hlintOpt "--hint=Generalise" src/Borrower.hs
eric@linux-epth:total-beginner-haskell$ ghc-mod lint --hlintOpt '--hint=Generalise' src/Borrower.hs
What is the correct format to use with ghc-mod to pass arguments through it to hlint?
Thank you.