on develop help sign in
Update the doc strings for traceDyn*
4e7d1b1Ryan Trinkle
src/Reflex/Dynamic.hs+5−3
@@ -185,8 +185,9 @@ distributeListOverDynPure =
185joinDynThroughMap :: forall t k a. (Reflex t, Ord k) => Dynamic t (Map k (Dynamic t a)) -> Dynamic t (Map k a)
185joinDynThroughMap :: forall t k a. (Reflex t, Ord k) => Dynamic t (Map k (Dynamic t a)) -> Dynamic t (Map k a)
186joinDynThroughMap = joinDyn . fmap distributeMapOverDynPure
186joinDynThroughMap = joinDyn . fmap distributeMapOverDynPure
187
187
188−-- | Print the value of the 'Dynamic' on each change and prefix it
188+-- | Print the value of the 'Dynamic' when it is first read and on each
189+-- subsequent change that is observed (as traceEvent), prefixed with the
189−-- with the provided string. This should /only/ be used for debugging.
190+-- provided string. This should /only/ be used for debugging.
190--
191--
191-- Note: Just like Debug.Trace.trace, the value will only be shown if something
192-- Note: Just like Debug.Trace.trace, the value will only be shown if something
192-- else in the system is depending on it.
193-- else in the system is depending on it.
@@ -194,7 +195,8 @@ traceDyn :: (Reflex t, Show a) => String -> Dynamic t a -> Dynamic t a
194traceDyn s = traceDynWith $ \x -> s <> ": " <> show x
195traceDyn s = traceDynWith $ \x -> s <> ": " <> show x
195
196
196-- | Print the result of applying the provided function to the value
197-- | Print the result of applying the provided function to the value
197−-- of the 'Dynamic' on each change. This should /only/ be used for
198+-- of the 'Dynamic' when it is first read and on each subsequent change
199+-- that is observed (as traceEvent). This should /only/ be used for
198-- debugging.
200-- debugging.
199--
201--
200-- Note: Just like Debug.Trace.trace, the value will only be shown if something
202-- Note: Just like Debug.Trace.trace, the value will only be shown if something