Skip to content

Commit d35db8c

Browse files
authored
Merge pull request #326 from alexfmpe/clarify-view-docs
Add missing details to documentation of 'networkView' and 'workflowView'
2 parents d79405c + ab83e25 commit d35db8c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Reflex/Network.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Reflex.NotReady.Class
2020
import Reflex.PostBuild.Class
2121

2222
-- | A 'Dynamic' "network": Takes a 'Dynamic' of network-creating actions and replaces the network whenever the 'Dynamic' updates.
23-
-- The returned Event of network results fires when the 'Dynamic' updates.
23+
-- The returned Event of network results fires at post-build time and when the 'Dynamic' updates.
2424
-- Note: Often, the type 'a' is an Event, in which case the return value is an Event-of-Events, where the outer 'Event' fires
2525
-- when switching networks. Such an 'Event' would typically be flattened (via 'switchPromptly').
2626
networkView :: (NotReady t m, Adjustable t m, PostBuild t m) => Dynamic t (m a) -> m (Event t a)

src/Reflex/Workflow.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ workflow w0 = do
3434
rec eResult <- networkHold (unWorkflow w0) $ fmap unWorkflow $ switch $ snd <$> current eResult
3535
return $ fmap fst eResult
3636

37-
-- | Similar to 'workflow', but outputs an 'Event' that fires whenever the current 'Workflow' is replaced by the next 'Workflow'.
37+
-- | Similar to 'workflow', but outputs an 'Event' that fires at post-build time and whenever the current 'Workflow' is replaced by the next 'Workflow'.
3838
workflowView :: forall t m a. (Reflex t, NotReady t m, Adjustable t m, MonadFix m, MonadHold t m, PostBuild t m) => Workflow t m a -> m (Event t a)
3939
workflowView w0 = do
4040
rec eResult <- networkView . fmap unWorkflow =<< holdDyn w0 eReplace

0 commit comments

Comments
 (0)