@@ -60,6 +60,7 @@ module Reflex.Dom.Widget.Basic
60 , partitionMapBySetLT
60 , partitionMapBySetLT
63+import Reflex.Adjustable.Class
63import Reflex.Class
64import Reflex.Class
64import Reflex.Collection
65import Reflex.Collection
65import Reflex.Dom.Builder.Class
66import Reflex.Dom.Builder.Class
@@ -146,21 +147,21 @@ button t = do
146-- | Given a Dynamic of widget-creating actions, create a widget that is recreated whenever the Dynamic updates.
147-- | Given a Dynamic of widget-creating actions, create a widget that is recreated whenever the Dynamic updates.
147-- The returned Event of widget results occurs when the Dynamic does.
148-- The returned Event of widget results occurs when the Dynamic does.
148-- 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 'switchHold').
149-- 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 'switchHold').
149−dyn :: (DomBuilder t m, PostBuild t m) => Dynamic t (m a) -> m (Event t a)
150+dyn :: (Adjustable t m, NotReady t m, PostBuild t m) => Dynamic t (m a) -> m (Event t a)
150dyn = networkView
151dyn = networkView
152-- | Like 'dyn' but discards result.
153-- | Like 'dyn' but discards result.
153−dyn_ :: (DomBuilder t m, PostBuild t m) => Dynamic t (m a) -> m ()
154+dyn_ :: (Adjustable t m, NotReady t m, PostBuild t m) => Dynamic t (m a) -> m ()
154dyn_ = void . dyn
155dyn_ = void . dyn
156-- | Given an initial widget and an Event of widget-creating actions, create a widget that is recreated whenever the Event fires.
157-- | Given an initial widget and an Event of widget-creating actions, create a widget that is recreated whenever the Event fires.
157-- The returned Dynamic of widget results occurs when the Event does.
158-- The returned Dynamic of widget results occurs when the Event does.
158-- Note: Often, the type 'a' is an Event, in which case the return value is a Dynamic-of-Events that would typically be flattened (via 'switchDyn').
159-- Note: Often, the type 'a' is an Event, in which case the return value is a Dynamic-of-Events that would typically be flattened (via 'switchDyn').
159−widgetHold :: (DomBuilder t m, MonadHold t m) => m a -> Event t (m a) -> m (Dynamic t a)
160+widgetHold :: (Adjustable t m, MonadHold t m) => m a -> Event t (m a) -> m (Dynamic t a)
160widgetHold = networkHold
161widgetHold = networkHold
162-- | Like 'widgetHold' but discards result.
163-- | Like 'widgetHold' but discards result.
163−widgetHold_ :: (DomBuilder t m, MonadHold t m) => m a -> Event t (m a) -> m ()
164+widgetHold_ :: (Adjustable t m, MonadHold t m) => m a -> Event t (m a) -> m ()
164widgetHold_ z = void . widgetHold z
165widgetHold_ z = void . widgetHold z
166-- | Create a DOM element
167-- | Create a DOM element