on develop help sign in
Cleanup console output of Reflex.Dom.Widget.Basic
commit48eed839a3fd36555e855efe06aea61da49659c3 authorRyan Trinkle <ryan.trinkle@gmail.com> dateSun 8 Mar 2015, 20:01 (12 years ago) parent70c5686
1 file changed−16
src/Reflex/Dom/Widget/Basic.hs−16
src/Reflex/Dom/Widget/Basic.hs−16
@@ -155,7 +155,6 @@ widgetHold child0 newChild = do
155155 return ()
156156 return ()
157157 addVoidAction $ ffor newChild $ \c -> do
158− liftIO $ putStrLn "Clearing widgetHold"
159158 liftIO $ deleteBetweenExclusive startPlaceholder endPlaceholder
160159 build c
161160 holdDyn result0 $ fmap fst newChildBuilt
@@ -192,11 +191,9 @@ listWithKey vals mkChild = do
192191 --TODO: Should we remove the parent from the DOM first to avoid reflows?
193192 (newState, postBuild) <- flip runStateT (return ()) $ liftM (Map.mapMaybe id) $ iforM (align curState newVals) $ \k -> \case
194193 This ((_, (start, end)), _) -> do
195− liftIO $ putStrLn "Deleting item"
196194 liftIO $ deleteBetweenInclusive start end
197195 return Nothing
198196 That v -> do
199− liftIO $ putStrLn "Creating item"
200197 Just df <- liftIO $ documentCreateDocumentFragment doc
201198 (childResult, childPostBuild, childVoidAction) <- lift $ buildChild df k v
202199 let s = (childResult, childVoidAction)
@@ -208,13 +205,9 @@ listWithKey vals mkChild = do
208205 liftIO $ nodeInsertBefore p (Just df) (Just placeholder)
209206 return $ Just s
210207 These state _ -> do
211− liftIO $ putStrLn "Leaving item unchanged"
212208 return $ Just state
213− liftIO $ putStrLn "Triggering newChildren"
214− liftIO $ putStrLn . ("newChildrenTriggerRef is Just? " <>) . show . isJust =<< readRef newChildrenTriggerRef
215209 runFrameWithTriggerRef newChildrenTriggerRef newState
216210 postBuild
217− liftIO $ putStrLn "Triggering newChildren done"
218211 holdDyn Map.empty $ fmap (fmap (fst . fst)) newChildren
219212
220213listWithKey' :: forall t m k v a. (Ord k, MonadWidget t m) => Map k v -> Event t (Map k (Maybe v)) -> (k -> v -> Event t v -> m a) -> m (Dynamic t (Map k a))
@@ -269,11 +262,8 @@ listWithKey' initialVals valsChanged mkChild = do
269262 return $ Just s
270263 This state -> do -- No change
271264 return $ Just state
272− liftIO $ putStrLn "Triggering newChildren"
273− liftIO $ putStrLn . ("newChildrenTriggerRef is Just? " <>) . show . isJust =<< readRef newChildrenTriggerRef
274265 runFrameWithTriggerRef newChildrenTriggerRef newState
275266 postBuild
276− liftIO $ putStrLn "Triggering newChildren done"
277267 mapDyn (fmap (fst . fst)) children
278268
279269--TODO: Something better than Dynamic t (Map k v) - we want something where the Events carry diffs, not the whole value
@@ -311,11 +301,9 @@ listViewWithKey' vals mkChild = do
311301 --TODO: Should we remove the parent from the DOM first to avoid reflows?
312302 (newState, postBuild) <- flip runStateT (return ()) $ liftM (Map.mapMaybe id) $ iforM (align curState newVals) $ \k -> \case
313303 This ((_, (start, end)), _) -> do
314− liftIO $ putStrLn "Deleting item"
315304 liftIO $ deleteBetweenInclusive start end
316305 return Nothing
317306 That v -> do
318− liftIO $ putStrLn "Creating item"
319307 Just df <- liftIO $ documentCreateDocumentFragment doc
320308 (childResult, childPostBuild, childVoidAction) <- lift $ buildChild df k v
321309 let s = (childResult, childVoidAction)
@@ -327,13 +315,9 @@ listViewWithKey' vals mkChild = do
327315 liftIO $ nodeInsertBefore p (Just df) (Just placeholder)
328316 return $ Just s
329317 These state _ -> do
330− liftIO $ putStrLn "Leaving item unchanged"
331318 return $ Just state
332− liftIO $ putStrLn "Triggering newChildren"
333− liftIO $ putStrLn . ("newChildrenTriggerRef is Just? " <>) . show . isJust =<< readRef newChildrenTriggerRef
334319 runFrameWithTriggerRef newChildrenTriggerRef newState
335320 postBuild
336− liftIO $ putStrLn "Triggering newChildren done"
337321 return $ fmap (fmap (fst . fst)) children
338322
339323--TODO: Deduplicate the various list*WithKey* implementations