on develop help sign in
Suggest function for flattening results of 'dyn'
commitc17d6c3cd30707d14d700c8874bdd825be6f65c6 authorMichael Sloan <mgsloan@gmail.com> dateMon 15 Feb 2016, 15:16 (11 years ago) parent18d3ce2
1 file changed+1−1
src/Reflex/Dom/Widget/Basic.hs+1−1
src/Reflex/Dom/Widget/Basic.hs+1−1
@@ -130,7 +130,7 @@ display a = dynText =<< mapDyn show a
130130--TODO: Should this be renamed to 'widgetView' for consistency with 'widgetHold'?
131131-- | Given a Dynamic of widget-creating actions, create a widget that is recreated whenever the Dynamic updates.
132132-- The returned Event of widget results occurs when the Dynamic does.
133−-- Note: Often, the type 'a' is an Event, in which case the return value is an Event-of-Events that would typically be flattened.
133+-- Note: Often, the type 'a' is an Event, in which case the return value is an Event-of-Events that would typically be flattened (via 'switchPromptly').
134134dyn :: MonadWidget t m => Dynamic t (m a) -> m (Event t a)
135135dyn child = do
136136 postBuild <- getPostBuild