ekmett/lens

HLint fails in master

Closed this issue · 2 comments

phadej commented
HLint fails in master

For reference, here is the failure:

src/Control/Lens/Internal/FieldTH.hs:6:1-32: Warning: Unused LANGUAGE pragma
Found:
  {-# LANGUAGE TemplateHaskell #-}
Perhaps you should remove it.
Note: may require `{-# LANGUAGE TemplateHaskellQuotes #-}` adding to the top of the file

1 hint
Error: Process completed with exit code 1.

Which is warning about this code:

#if __GLASGOW_HASKELL__ >= 800
{-# LANGUAGE TemplateHaskellQuotes #-}
#else
{-# LANGUAGE TemplateHaskell #-}
#endif

But this confuses me: the {-# LANGUAGE TemplateHaskell #-} line should only be reachable if using a very old version of GHC. Does hlint not take CPP into account?

It's possible that this is an occurrence of ndmitchell/hlint#1522. This has been fixed in hlint-3.6, and indeed, I cannot reproduce the issue locally with that version of hlint. (I do encounter other hlint warnings, but those appear fixable.)