Open bergmark opened 6 years ago
Clearly the current state is wrong - these things should be more equivalent. However, do you think that concat/map
should hint if you have disabled the Prelude?
With these examples it would make sense if it didn't trigger, but like i said it also seems to affect non-prelude related hints...
My actual code is the following, where i have Prelude imported through other means:
import Prelude ()
import Prelude.Compat
The awkward thing is that if you add import Prelude ()
hlint will "stop" linting your files without telling you...
Yep, noted - I was more asking about the future hypothetical solution where all that is fixed.
Perhaps a workaround for import Prelude (); import Prelude.Compat
could be if hlint supported declaring module aliases? This at least solves the issue for projects using base-compat.
Yep, I think we'll need some form of module aliases, as per #434. My inclination is to just name all the common Prelude replacements in the standard HLint install, since those are the common ones.
sounds good!
This seems to affect custom hints that don't use anything from Prelude (such as the wibble example in the defaults) as well.
Test1.hs
But it's fine if
NoImplicitPrelude
is used insteadTest2.hs