Ignore "traverse_" from hlint
In https://travis-ci.org/reflex-frp/reflex/builds/616304027 we notice
that hlint suggests:
linting file src/Reflex/Spider/Internal.hs...
reflex-0.6.2.4/src/Reflex/Spider/Internal.hs:497:13: Warning: Use traverse_
Found:
WeakBag.traverse (coincidenceSubscribedSubscribers subscribed)
$ invalidateSubscriberHeight outerHeight
Perhaps:
traverse_ (coincidenceSubscribedSubscribers subscribed)
$ invalidateSubscriberHeight outerHeight
1 hint
This suggestion isn’t relevant because we don’t have a “traverse_”
equivalent for WeakBag.traverse. Looking at the code in
Hlint (src/Hint/Monad.hs), it becomes clear that it’s a dumb search
for any usage of “traverse”, regardless of being in the Traversable
typeclass.
What’s less clear is why this used to not be a problem before
recently. This error appears to coincide with an update of hlint from
v2.2.2 to v2.2.4.
To fix this, tell Hlint to ignore “Use traverse_” hints in Reflex.
This can be removed once Hlint is taught to distinguise between
traverse from the Traversable typeclass and from somewhere else.
commit755a0cea6ac1c4886641efffefde5e8d4442b5ee
authorMatthew Bauer <mjbauer95@gmail.com>
dateMon 25 Nov 2019, 12:15 (7 years ago)
parentde9d2b0
test/hlint.hs+1
@@ -23,6 +23,7 @@ main = do
2323 , "--ignore=Reduce duplication"
2424 , "--cpp-define=USE_TEMPLATE_HASKELL"
2525 , "--ignore=Use tuple-section"
26+ , "--ignore=Use traverse_"
2627 ]
2728 recurseInto = and <$> sequence
2829 [ fileType ==? Directory