mirror of
https://github.com/ilyakooo0/reflex-dom.git
synced 2024-09-11 06:35:30 +03:00
Fix hlint
This commit is contained in:
parent
bf1ce6af3a
commit
59100d6128
@ -27,12 +27,12 @@ main = mainWidget $ do
|
||||
values = zip3 (randoms (mkStdGen 0)) (randoms (mkStdGen 1)) (randoms (mkStdGen 2))
|
||||
testMap = Map.fromList $ zip keys values
|
||||
resort <- leftmost <$> sequence
|
||||
[ fmap (comparing (view _1) <$) $ button "1 ASC"
|
||||
, fmap (flip (comparing (view _1)) <$) $ button "1 DESC"
|
||||
, fmap (comparing (view _2) <$) $ button "2 ASC"
|
||||
, fmap (flip (comparing (view _2)) <$) $ button "2 DESC"
|
||||
, fmap (comparing (view _3) <$) $ button "3 ASC"
|
||||
, fmap (flip (comparing (view _3)) <$) $ button "3 DESC"
|
||||
[ (comparing (view _1) <$) <$> button "1 ASC"
|
||||
, (flip (comparing (view _1)) <$) <$> button "1 DESC"
|
||||
, (comparing (view _2) <$) <$> button "2 ASC"
|
||||
, (flip (comparing (view _2)) <$) <$> button "2 DESC"
|
||||
, (comparing (view _3) <$) <$> button "3 ASC"
|
||||
, (flip (comparing (view _3)) <$) <$> button "3 DESC"
|
||||
]
|
||||
simpleSortableList f testMap resort
|
||||
return ()
|
||||
|
@ -436,13 +436,7 @@ instance (Reflex t, MonadAdjust t m, MonadIO m, MonadHold t m, PerformEvent t m,
|
||||
return (result0, result')
|
||||
traverseDMapWithKeyWithAdjust (f :: forall a. k a -> v a -> ImmediateDomBuilderT t m (v' a)) (dm0 :: DMap k v) dm' = do
|
||||
initialEnv <- ImmediateDomBuilderT ask
|
||||
let drawChildUpdate :: forall a. ImmediateDomBuilderT t m (v' a) -> m (Compose ((,,) DOM.DocumentFragment DOM.Text) v' a)
|
||||
drawChildUpdate child = do
|
||||
Just df <- createDocumentFragment $ _immediateDomBuilderEnv_document initialEnv
|
||||
runImmediateDomBuilderT (Compose <$> ((,,) <$> pure df <*> textNodeInternal ("" :: Text) <*> child)) $ initialEnv
|
||||
{ _immediateDomBuilderEnv_parent = toNode df
|
||||
}
|
||||
(children0, children') <- lift $ traverseDMapWithKeyWithAdjust (\k v -> drawChildUpdate $ f k v) dm0 dm'
|
||||
(children0, children') <- lift $ traverseDMapWithKeyWithAdjust (\k v -> drawChildUpdate initialEnv $ f k v) dm0 dm'
|
||||
let result0 = DMap.map (\(Compose (_, _, v)) -> v) children0
|
||||
placeholders0 = weakenDMapWith (\(Compose (_, ph, _)) -> ph) children0
|
||||
result' = ffor children' $ mapPatchDMap $ \(Compose (_, _, r)) -> r
|
||||
@ -462,13 +456,7 @@ instance (Reflex t, MonadAdjust t m, MonadIO m, MonadHold t m, PerformEvent t m,
|
||||
return (result0, result')
|
||||
traverseDMapWithKeyWithAdjustWithMove (f :: forall a. k a -> v a -> ImmediateDomBuilderT t m (v' a)) (dm0 :: DMap k v) dm' = do
|
||||
initialEnv <- ImmediateDomBuilderT ask
|
||||
let drawChildUpdate :: forall a. ImmediateDomBuilderT t m (v' a) -> m (Compose ((,,) DOM.DocumentFragment DOM.Text) v' a)
|
||||
drawChildUpdate child = do
|
||||
Just df <- createDocumentFragment $ _immediateDomBuilderEnv_document initialEnv
|
||||
runImmediateDomBuilderT (Compose <$> ((,,) <$> pure df <*> textNodeInternal ("" :: Text) <*> child)) $ initialEnv
|
||||
{ _immediateDomBuilderEnv_parent = toNode df
|
||||
}
|
||||
(children0, children') <- lift $ traverseDMapWithKeyWithAdjustWithMove (\k v -> drawChildUpdate $ f k v) dm0 dm'
|
||||
(children0, children') <- lift $ traverseDMapWithKeyWithAdjustWithMove (\k v -> drawChildUpdate initialEnv $ f k v) dm0 dm'
|
||||
let result0 = DMap.map (\(Compose (_, _, v)) -> v) children0
|
||||
placeholders0 = weakenDMapWith (\(Compose (_, ph, _)) -> ph) children0
|
||||
result' = ffor children' $ mapPatchDMapWithMove $ \(Compose (_, _, r)) -> r
|
||||
@ -508,6 +496,11 @@ instance (Reflex t, MonadAdjust t m, MonadIO m, MonadHold t m, PerformEvent t m,
|
||||
return ()
|
||||
return (result0, result')
|
||||
|
||||
drawChildUpdate :: MonadIO m => ImmediateDomBuilderEnv t -> ImmediateDomBuilderT t m (v' a) -> m (Compose ((,,) DOM.DocumentFragment DOM.Text) v' a)
|
||||
drawChildUpdate initialEnv child = do
|
||||
Just df <- createDocumentFragment $ _immediateDomBuilderEnv_document initialEnv
|
||||
runImmediateDomBuilderT (Compose <$> ((,,) <$> pure df <*> textNodeInternal ("" :: Text) <*> child)) $ initialEnv { _immediateDomBuilderEnv_parent = toNode df }
|
||||
|
||||
mkHasFocus :: (MonadHold t m, Reflex t) => Element er d t -> m (Dynamic t Bool)
|
||||
mkHasFocus e = do
|
||||
let initialFocus = False --TODO: Actually get the initial focus of the element
|
||||
|
@ -8,5 +8,13 @@ main = do
|
||||
, "--ignore=Redundant do"
|
||||
, "--ignore=Use camelCase"
|
||||
, "--ignore=Redundant $"
|
||||
, "--ignore=Use &&"
|
||||
, "--ignore=Use &&&"
|
||||
, "--ignore=Use const"
|
||||
, "--ignore=Use >=>"
|
||||
, "--ignore=Use ."
|
||||
, "--ignore=Use if"
|
||||
, "--ignore=Reduce duplication" --TODO: Re-enable this test
|
||||
, "--cpp-define=USE_TEMPLATE_HASKELL"
|
||||
]
|
||||
if null ideas then exitSuccess else exitFailure
|
||||
|
Loading…
Reference in New Issue
Block a user