on develop help sign in
Fix hlint
09bcdcfRyan Trinkle
src/Reflex/Query/Base.hs+4−4
@@ -102,14 +102,14 @@ instance (Reflex t, MonadFix m, Group q, Additive q, Query q, MonadHold t m, Adj
102 let f' :: IntMap.Key -> v -> EventWriterT t q (ReaderT (Dynamic t (QueryResult q)) m) (QueryTLoweredResult t q v')
102 let f' :: IntMap.Key -> v -> EventWriterT t q (ReaderT (Dynamic t (QueryResult q)) m) (QueryTLoweredResult t q v')
103 f' k v = fmap QueryTLoweredResult $ flip runStateT [] $ unQueryT $ f k v
103 f' k v = fmap QueryTLoweredResult $ flip runStateT [] $ unQueryT $ f k v
104 (result0, result') <- QueryT $ lift $ traverseIntMapWithKeyWithAdjust f' im0 im'
104 (result0, result') <- QueryT $ lift $ traverseIntMapWithKeyWithAdjust f' im0 im'
105− let liftedResult0 = IntMap.map (\r -> getQueryTLoweredResultValue r) result0
105+ let liftedResult0 = IntMap.map getQueryTLoweredResultValue result0
106 liftedResult' = fforCheap result' $ \(PatchIntMap p) -> PatchIntMap $
106 liftedResult' = fforCheap result' $ \(PatchIntMap p) -> PatchIntMap $
107− IntMap.map (\mr -> fmap getQueryTLoweredResultValue mr) p
107+ IntMap.map (fmap getQueryTLoweredResultValue) p
108 liftedBs0 :: IntMap [Behavior t q]
108 liftedBs0 :: IntMap [Behavior t q]
109− liftedBs0 = IntMap.map (\r -> getQueryTLoweredResultWritten r) result0
109+ liftedBs0 = IntMap.map getQueryTLoweredResultWritten result0
110 liftedBs' :: Event t (PatchIntMap [Behavior t q])
110 liftedBs' :: Event t (PatchIntMap [Behavior t q])
111 liftedBs' = fforCheap result' $ \(PatchIntMap p) -> PatchIntMap $
111 liftedBs' = fforCheap result' $ \(PatchIntMap p) -> PatchIntMap $
112− IntMap.map (\mr -> fmap getQueryTLoweredResultWritten mr) p
112+ IntMap.map (fmap getQueryTLoweredResultWritten) p
113 sampleBs :: forall m'. MonadSample t m' => [Behavior t q] -> m' q
113 sampleBs :: forall m'. MonadSample t m' => [Behavior t q] -> m' q
114 sampleBs = foldlM (\b a -> (b <>) <$> sample a) mempty
114 sampleBs = foldlM (\b a -> (b <>) <$> sample a) mempty
115 accumBehaviors :: forall m'. MonadHold t m'
115 accumBehaviors :: forall m'. MonadHold t m'
test/hlint.hs+1
@@ -20,6 +20,7 @@ main = do
20 , "--ignore=Use >=>"
20 , "--ignore=Use >=>"
21 , "--ignore=Use ."
21 , "--ignore=Use ."
22 , "--ignore=Use unless"
22 , "--ignore=Use unless"
23+ , "--ignore=Reduce duplication"
23 , "--cpp-define=USE_TEMPLATE_HASKELL"
24 , "--cpp-define=USE_TEMPLATE_HASKELL"
24 ]
25 ]
25 recurseInto = and <$> sequence
26 recurseInto = and <$> sequence