on develop help sign in
Huge reorganization.
commita8194ed5b6614d6e41ac905883470f096921c1da authorDan Brown <dbbnrl@gmail.com> dateThu 30 Jul 2015, 15:39 (11 years ago) parent9a6fb4d
1 file changed+228−115
Quickref.md+228−115
Quickref.md+228−115
@@ -8,7 +8,7 @@ Many Reflex functions operate in monadic context `X a`, where the monadic type X
88mainWidget :: Widget Spider (Gui Spider (WithWebView SpiderHost) (HostFrame Spider)) () -> IO ()
99```
1010
11−The function signatures here have been simplified by removing many typeclass constraints and adding simple annotations to each function.
11+The function signatures here have been simplified by removing many typeclass constraints and adding simple annotations to each function. Also the ubiquitous 't' type parameter has been removed.
1212
1313Functions annotated with "[ ]" are *pure*: They operate on Events, Behaviors, or Dynamics uniformly without regard to the "current time".
1414
@@ -28,169 +28,282 @@ Since MonadWidget depends on MonadHold and MonadHold depends on MonadSample, any
2828
2929```haskell
3030-- Trivial Event
31−[ ] never :: Event t a
31+[ ] never :: Event a
32+
3233-- Extract Event from Dynamic
33−[ ] updated :: Dynamic t a -> Event t a
34+[ ] updated :: Dynamic a -> Event a
35+
3436-- Transform Event to Event using function
35−[ ] fmap :: (a -> b) -> Event t a -> Event t b
36−[ ] fmapMaybe :: (a -> Maybe b) -> Event t a -> Event t b
37−[ ] ffor :: Event t a -> (a -> b) -> Event t b
38−[ ] fforMaybe :: Event t a -> (a -> Maybe b) -> Event t b
39−[ ] ffilter :: (a -> Bool) -> Event t a -> Event t a
40−[ ] splitE :: Event t (a, b) -> (Event t a, Event t b)
37+[ ] fmap :: (a -> b) -> Event a -> Event b
38+[ ] fmapMaybe :: (a -> Maybe b) -> Event a -> Event b
39+[ ] ffor :: Event a -> (a -> b) -> Event b
40+[ ] fforMaybe :: Event a -> (a -> Maybe b) -> Event b
41+[ ] ffilter :: (a -> Bool) -> Event a -> Event a
42+[ ] splitE :: Event (a, b) -> (Event a, Event b)
43+
4144-- Event to identical Event with debug trace.
42−[ ] traceEvent :: Show a => String -> Event t a -> Event t a
43−[ ] traceEventWith :: (a -> String) -> Event t a -> Event t a
45+[ ] traceEvent :: Show a => String -> Event a -> Event a
46+[ ] traceEventWith :: (a -> String) -> Event a -> Event a
47+
4448-- Transform Event to Event by sampling Behavior or Dynamic
45−[ ] tag :: Behavior t b -> Event t a -> Event t b
46−[ ] tagDyn :: Dynamic t a -> Event t b -> Event t a
47−[ ] gate :: Behavior t Bool -> Event t a -> Event t a
48−[ ] attach :: Behavior t a -> Event t b -> Event t (a, b)
49−[ ] attachDyn :: Dynamic t a -> Event t b -> Event t (a, b)
50−[ ] attachWith :: (a -> b -> c) -> Behavior t a -> Event t b -> Event t c
51−[ ] attachDynWith :: (a -> b -> c) -> Dynamic t a -> Event t b -> Event t c
52−[ ] attachWithMaybe :: (a -> b -> Maybe c) -> Behavior t a -> Event t b -> Event t c
53−[ ] attachDynWithMaybe :: (a -> b -> Maybe c) -> Dynamic t a -> Event t b -> Event t c
49+[ ] tag :: Behavior b -> Event a -> Event b
50+[ ] tagDyn :: Dynamic a -> Event b -> Event a
51+[ ] gate :: Behavior Bool -> Event a -> Event a
52+[ ] attach :: Behavior a -> Event b -> Event (a, b)
53+[ ] attachDyn :: Dynamic a -> Event b -> Event (a, b)
54+[ ] attachWith :: (a -> b -> c) -> Behavior a -> Event b -> Event c
55+[ ] attachDynWith :: (a -> b -> c) -> Dynamic a -> Event b -> Event c
56+[ ] attachWithMaybe :: (a -> b -> Maybe c) -> Behavior a -> Event b -> Event c
57+[ ] attachDynWithMaybe :: (a -> b -> Maybe c) -> Dynamic a -> Event b -> Event c
58+
5459-- Combine multiple Events
55−[ ] <> :: Monoid a => Event t a -> Event t a -> Event t a
56−[ ] mergeWith :: (a -> a -> a) -> [Event t a] -> Event t a
57−[ ] leftmost :: [Event t a] -> Event t a
58−[ ] mergeList :: [Event t a] -> Event t (NonEmpty a)
59−[ ] merge :: GCompare k => DMap (WrapArg (Event t) k) -> Event t (DMap k)
60−[ ] mergeMap :: Ord k => Map k (Event t a) -> Event t (Map k a)
61−-- Unwrap Event-of-Event to Event
62−[ ] coincidence :: Event t (Event t a) -> Event t a
63−-- Unwrap Behavior-of-Event to Event
64−[ ] switch :: Behavior t (Event t a) -> Event t a
65−-- Unwrap Dyanmic-of-Event to Event
66−[ ] switchPromptlyDyn :: Dynamic t (Event t a) -> Event t a
60+[ ] <> :: Monoid a => Event a -> Event a -> Event a
61+[ ] mergeWith :: (a -> a -> a) -> [Event a] -> Event a
62+[ ] leftmost :: [Event a] -> Event a
63+[ ] mergeList :: [Event a] -> Event (NonEmpty a)
64+[ ] merge :: GCompare k => DMap (WrapArg Event k) -> Event (DMap k)
65+[ ] mergeMap :: Ord k => Map k (Event a) -> Event (Map k a)
66+
6767-- Efficient one-to-many fanout
68−[ ] fan :: GCompare k => Event t (DMap k) -> EventSelector t k
69−[ ] fanMap :: Ord k => Event t (Map k a) -> EventSelector t (Const2 k a)
70−[ ] select :: EventSelector t k -> k a -> Event t a
68+[ ] fan :: GCompare k => Event (DMap k) -> EventSelector k
69+[ ] fanMap :: Ord k => Event (Map k a) -> EventSelector (Const2 k a)
70+[ ] select :: EventSelector k -> k a -> Event a
71+
7172-- Event to Event via monadic function
72−[ ] push :: (a -> m (Maybe b)) -> Event t a -> Event t b
73−[ ] pushAlways :: (a -> m b) -> Event t a -> Event t b
73+[ ] push :: (a -> m (Maybe b)) -> Event a -> Event b
74+[ ] pushAlways :: (a -> m b) -> Event a -> Event b
7475 -- Note supplied function operates in [H] context
76+
7577-- Event to monadic Event
76−[H] headE :: Event t a -> m (Event t a)
77−[H] tailE :: Event t a -> m (Event t a)
78−[H] headTailE :: Event t a -> m (Event t a, Event t a)
79−-- Event-of-Event to monadic Event
80−[H] switchPromptly :: Event t a -> Event t (Event t a) -> m (Event t a)
78+[H] headE :: Event a -> m (Event a)
79+[H] tailE :: Event a -> m (Event a)
80+[H] headTailE :: Event a -> m (Event a, Event a)
81+```
82+
83+### Event flattening functions
84+
85+These functions flatten Event-of-Event, Behavior-of-Event, or Dynamic-of-Event into Event, where the returned Event fires whenever the latest Event supplied by the wrapper fires. There are subtle differences in how they handle *coincidences* -- situations where the old or new Event fires at the same instant that we switch from old to new. In some cases, the output Event tracks the old Event at the instant of switchover, while in other cases it tracks the new Event.
86+
87+```haskell
88+-- Flatten Event-of-Event to monadic Event. New Event is used immediately.
89+[H] switchPromptly :: Event a -> Event (Event a) -> m (Event a)
90+
91+-- Flatten Behavior-of-Event to Event. Old Event is used during switchover.
92+[ ] switch :: Behavior (Event a) -> Event a
93+
94+-- Flatten Dyanmic-of-Event to Event. New Event is used immediately.
95+[ ] switchPromptlyDyn :: Dynamic (Event a) -> Event a
96+
97+-- Flatten Event-of-Event to Event that fires when both wrapper and new Event fire.
98+[ ] coincidence :: Event (Event a) -> Event a
8199```
82100
83101### Functions producing Behavior
84102
85103```haskell
86104-- Trivial Behavior
87−[ ] constant :: a -> Behavior t a
105+[ ] constant :: a -> Behavior a
106+
88107-- Extract Behavior from Dynamic
89−[ ] current :: Dynamic t a -> Behavior t a
108+[ ] current :: Dynamic a -> Behavior a
109+
90110-- Transform Behavior to Behavior using function
91−[ ] fmap :: (a -> b) -> Behavior t a -> Behavior t b
92−[ ] ffor :: Behavior t a -> (a -> b) -> Behavior t b
93−[ ] <*> :: Behavior t (a -> b) -> Behavior t a -> Behavior t b
94−[ ] >>= :: Behavior t a -> (a -> Behavior t b) -> Behavior t b
95−[ ] <> :: Monoid a => Behavior t a -> Behavior t a -> Behavior t a
111+[ ] fmap :: (a -> b) -> Behavior a -> Behavior b
112+[ ] ffor :: Behavior a -> (a -> b) -> Behavior b
113+[ ] <*> :: Behavior (a -> b) -> Behavior a -> Behavior b
114+[ ] >>= :: Behavior a -> (a -> Behavior b) -> Behavior b
115+[ ] <> :: Monoid a => Behavior a -> Behavior a -> Behavior a
116+
96117-- Behavior to Behavior via monadic value
97−[S] sample :: Behavior t a -> m a
98−[ ] pull :: m a -> Behavior t a
118+[S] sample :: Behavior a -> m a
119+[ ] pull :: m a -> Behavior a
99120 -- Note supplied value is in [S] context
121+
100122-- Event to monadic Behavior
101−[H] hold :: a -> Event t a -> m (Behavior t a)
102−-- Unwrap Event-of-Behavior to monadic Behavior
103−[H] switcher :: Behavior t a -> Event t (Behavior t a) -> m (Behavior t a)
123+[H] hold :: a -> Event a -> m (Behavior a)
124+
125+-- Flatten Event-of-Behavior to monadic Behavior
126+[H] switcher :: Behavior a -> Event (Behavior a) -> m (Behavior a)
104127```
105128
106129### Functions producing Dynamic
107130
108131```haskell
109132-- Trivial Dynamic
110−[ ] constDyn :: a -> Dynamic t a
133+[ ] constDyn :: a -> Dynamic a
134+
111135-- Construct Dynamic from Event
112−[H] holdDyn :: a -> Event t a -> m (Dynamic t a)
113−[H] foldDyn :: (a -> b -> b) -> b -> Event t a -> m (Dynamic t b)
114−[H] foldDynM :: (a -> b -> m' b) -> b -> Event t a -> m (Dynamic t b)
136+[H] holdDyn :: a -> Event a -> m (Dynamic a)
137+[H] foldDyn :: (a -> b -> b) -> b -> Event a -> m (Dynamic b)
138+[H] foldDynM :: (a -> b -> m' b) -> b -> Event a -> m (Dynamic b)
115139 -- Note supplied function operates in [H] context
116−[H] count :: Num b => Event t a -> m (Dynamic t b)
117−[H] toggle :: Bool -> Event t a -> m (Dynamic t Bool)
140+[H] count :: Num b => Event a -> m (Dynamic b)
141+[H] toggle :: Bool -> Event a -> m (Dynamic Bool)
142+
118143-- Transform Dynamic to Dynamic using function
119−[H] mapDyn :: (a -> b) -> Dynamic t a -> m (Dynamic t b)
120−[H] forDyn :: Dynamic t a -> (a -> b) -> m (Dynamic t b)
121−[H] mapDynM :: (a -> m' b) -> Dynamic t a -> m (Dynamic t b)
144+[H] mapDyn :: (a -> b) -> Dynamic a -> m (Dynamic b)
145+[H] forDyn :: Dynamic a -> (a -> b) -> m (Dynamic b)
146+[H] mapDynM :: (a -> m' b) -> Dynamic a -> m (Dynamic b)
122147 -- Note supplied function runs in [S] context
123−[H] splitDyn :: Dynamic t (a, b) -> m (Dynamic t a, Dynamic t b)
148+[H] splitDyn :: Dynamic (a, b) -> m (Dynamic a, Dynamic b)
149+
124150-- Combine multiple Dynamics
125−[H] mconcatDyn :: Monoid a => [Dynamic t a] -> m (Dynamic t a)
126−[H] distributeDMapOverDyn :: GCompare k => DMap (WrapArg (Dynamic t) k) -> m (Dynamic t (DMap k))
127−[H] combineDyn :: (a -> b -> c) -> Dynamic t a -> Dynamic t b -> m (Dynamic t c)
151+[H] mconcatDyn :: Monoid a => [Dynamic a] -> m (Dynamic a)
152+[H] distributeDMapOverDyn :: GCompare k => DMap (WrapArg Dynamic k) -> m (Dynamic (DMap k))
153+[H] combineDyn :: (a -> b -> c) -> Dynamic a -> Dynamic b -> m (Dynamic c)
154+
128155-- Unwrap Dynamic-of-Dynamic to Dynamic
129−[ ] joinDyn :: Dynamic t (Dynamic t a) -> Dynamic t a
130−[ ] joinDynThroughMap :: Ord k => Dynamic t (Map k (Dynamic t a)) -> Dynamic t (Map k a)
156+[ ] joinDyn :: Dynamic (Dynamic a) -> Dynamic a
157+[ ] joinDynThroughMap :: Ord k => Dynamic (Map k (Dynamic a)) -> Dynamic (Map k a)
158+
131159-- Efficient one-to-many fanout
132−[ ] demux :: Ord k => Dynamic t k -> Demux t k
133−[H] getDemuxed :: Eq k => Demux t k -> k -> m (Dynamic t Bool)
160+[ ] demux :: Ord k => Dynamic k -> Demux k
161+[H] getDemuxed :: Eq k => Demux k -> k -> m (Dynamic Bool)
162+
134163-- Dynamic to Dynamic, removing updates w/o value change
135−[ ] nubDyn :: Eq a => Dynamic t a -> Dynamic t a
164+[ ] nubDyn :: Eq a => Dynamic a -> Dynamic a
165+
136166-- Dynamic to identical Dynamic with debug trace.
137−[ ] traceDyn :: Show a => String -> Dynamic t a -> Dynamic t a
138−[ ] traceDynWith :: (a -> String) -> Dynamic t a -> Dynamic t a
167+[ ] traceDyn :: Show a => String -> Dynamic a -> Dynamic a
168+[ ] traceDynWith :: (a -> String) -> Dynamic a -> Dynamic a
139169```
140170
141171## Reflex-Dom
142172
143−### Startup
173+### Creating widgets (DOM elements hooked into the FRP system)
144174
145−```haskell
146−-- Reflex-Dom entry point. Takes a monadic widget-building action of lengthy type and turns it into an IO action.
147−[I] mainWidget :: Widget Spider (Gui Spider (WithWebView SpiderHost) (HostFrame Spider)) () -> IO ()
148−[I] mainWidgetWithHead :: Widget Spider (Gui Spider (WithWebView SpiderHost) (HostFrame Spider)) () -> Widget Spider (Gui Spider (WithWebView SpiderHost) (HostFrame Spider)) () -> IO ()
149−[I] mainWidgetWithCss :: ByteString -> Widget Spider (Gui Spider (WithWebView SpiderHost) (HostFrame Spider)) () -> IO ()
150−-- One-shot Event that is triggered once all initial widgets are built
151−[W] getPostBuild :: m (Event t ())
152−```
175+#### Basic widgets
176+
177+These functions generally take an element tag (such as "div", "h1", etc) and a child widget, and produce a widget of the given type containing the child. Some of these functions return data of type `El`, which is a handle to the created DOM element along with a set of potential Events that might occur on that element.
153178
154−### Performing side-effects
179+Widgets may return any type (this is 'a' in many of the functions below). Often this will be an Event carrying user interactions with the widget.
155180
156181```haskell
157−-- Run side-effecting actions in Event when it occurs; returned Event contains results. Side effects run in (WidgetHost m) monad, which includes [S] and [H] and can also do I/O via liftIO
158−[W] performEvent :: Event t (WidgetHost m a) -> m (Event t a)
159−-- Just run side-effects; no return Event
160−[W] performEvent_ :: Event t (WidgetHost m ()) -> m ()
161−-- Actions are run asynchronously; each action is given a callback to call when it completes
162−[W] performEventAsync :: Event t ((a -> IO ()) -> WidgetHost m ()) -> m (Event t a)
163−```
182+-- Simplest form. Create a widget of given type containing the given child.
183+-- Return whatever the child returns.
184+[W] el :: String -> m a -> m a
164185
165−### Creating widgets (DOM elements)
186+-- This version returns the 'El' as well.
187+[W] el' :: String -> m a -> m (El, a)
166188
167−In general, we want widgets that change over time -- why else are we using FRP? But there are two levels of dynamic behavior created by these functions. In the simple case, the *content* of a widget is dynamic but the *definition* of the widget is static (imagine a text element with changing text). The other possibility is that the definition of the widget is itself changing over time.
189+-- These two additionaly apply attributes to the element, such as ("class" =: "blah")
190+[W] elAttr :: String -> Map String String -> m a -> m a
191+[W] elAttr' :: String -> Map String String -> m a -> m (El, a)
168192
169−```haskell
170−-- Create a static text element (text' also returns the created DOM element)
193+-- As above, but now the attribute map is Dynamic
194+[W] elDynAttr :: String -> Dynamic (Map String String) -> m a -> m a
195+[W] elDynAttr' :: String -> Dynamic (Map String String) -> m a -> m (El, a)
196+
197+-- Shortcut for elAttr when you only want to set the "class" attribute.
198+[W] elClass :: String -> String -> m a -> m a
199+
200+-- Even shorter-cut for above when element type is "div". Create a div of given class.
201+[W] divClass :: String -> m a -> m a
202+
203+-- Create a widget of given type with arbitrary, Dymamic HTML inside.
204+[W] elDynHtml' :: String -> Dynamic String -> m El
205+[W] elDynHtmlAttr' :: String -> Map String String -> Dynamic String -> m El
206+
207+-- Shortcut for elDynHtml' where the type is "div" and you don't need the 'El'.
208+[W] dynHtml :: Dynamic String -> m ()
209+
210+-- Create a static text element
171211[W] text :: String -> m ()
172−[W] text' :: String -> m Text
212+
173213-- Create a dynamic text element
174−[W] dynText :: Dynamic t String -> m ()
175−[W] display :: Show a => Dynamic t a -> m ()
176−-- Create a dynamically-redefined widget. Returns Event of newly-created widgets.
177−[W] dyn :: Dynamic t (m a) -> m (Event t a)
178−-- Create a dynamically-redefined widget. Returns Dynamic of created widgets.
179−[W] widgetHold :: m a -> Event t (m a) -> m (Dynamic t a)
214+[W] dynText :: Dynamic String -> m ()
215+[W] display :: Show a => Dynamic a -> m ()
216+
217+-- Create a link ("a" element), given the destination URL.
218+[W] link :: String -> m Link
219+
220+-- Same as above with a class attribute.
221+[W] linkClass :: String -> String -> m Link
222+
223+-- Create a "button" element with given label, return onClick Event
224+[W] button :: String -> m (Event ())
225+
226+-- Empty widget
227+[W] blank :: m ()
228+```
229+
230+#### Dynamic widgets
231+
232+In the Dynamic cases above, the *content* of a widget is dynamic but the *definition* of the widget is static. The functions below enable the definition and/or structure of the widget itself to change over time.
233+
234+Note the "list" functions do not imply particular HTML tags (ul, li, etc), though the widgets they create can have those tags if you construct them appropriately.
235+
236+```haskell
237+-- Given a Dynamic of widget-creating actions, create a widget that is redefined whenever the Dynamic updates.
238+-- The returned Event of widget results occurs when the Dynamic does. Note that if type 'a' is an Event, the
239+-- return value is an Event-of-Events that would typically be flattened.
240+[W] dyn :: Dynamic (m a) -> m (Event a)
241+
242+-- Same as dyn, but takes initial value and an update Event instead of a Dynamic.
243+[W] widgetHold :: m a -> Event (m a) -> m (Dynamic a)
244+
180245-- Given a Dynamic key/value map and a function to create a widget for a given
181246-- key & Dynamic value, create a bunch of widgets. Widgets will be created,
182247-- destroyed, and updated appropriately as the map changes. Returns Dynamic map
183−-- from keys to widgets.
184−[W] listWithKey :: Ord k => Dynamic t (Map k v) -> (k -> Dynamic t v -> m a) -> m (Dynamic t (Map k a))
185−-- As above, but the supplied function creates dynamically-redefined widgets
186−-- where the definition of the widget can depend on the Dynamic via 'dyn'.
187−[W] listViewWithKey :: Ord k => Dynamic t (Map k v) -> (k -> Dynamic t v -> m (Event t a)) -> m (Event t (Map k a))
188−-- As above, but there is a "current key", and the widget constructor gets a
189−-- Dynamic Bool indicating if that widget is currently selected. This allows
190−-- widgets to render differently when selected.
191−[W] selectViewListWithKey_ :: Ord k => Dynamic t k -> Dynamic t (Map k v) -> (k -> Dynamic t v -> Dynamic t Bool -> m (Event t a)) -> m (Event t k)
192−-- As listWithKey, but takes initial values and an update Event instead of Dynamic.
193−[W] listWithKey' :: Ord k => Map k v -> Event t (Map k (Maybe v)) -> (k -> v -> Event t v -> m a) -> m (Dynamic t (Map k a))
194−
195−. . .
248+-- from keys to widget results.
249+[W] listWithKey :: Ord k => Dynamic (Map k v) -> (k -> Dynamic v -> m a) -> m (Dynamic (Map k a))
250+
251+-- Same as above where the widget constructor doesn't care about the key.
252+[W] list :: Ord k => Dynamic (Map k v) -> (Dynamic v -> m a) -> m (Dynamic (Map k a))
253+
254+-- Even simpler version where there are no keys and we just use a list.
255+[W] simpleList :: Dynamic [v] -> (Dynamic v -> m a) -> m (Dynamic [a])
256+
257+-- Same as listWithKey, but takes initial values and an updates Event instead of a Dynamic.
258+[W] listWithKey' :: Ord k => Map k v -> Event (Map k (Maybe v)) -> (k -> v -> Event v -> m a) -> m (Dynamic (Map k a))
259+
260+-- Like listWithKey specialized for widgets returning (Event a). listWithKey would return 'Dynamic (Map k (Event a))'
261+-- in this scenario, but listViewWithKey flattens this to 'Event (Map k a)' via 'switch'.
262+[W] listViewWithKey :: Ord k => Dynamic (Map k v) -> (k -> Dynamic v -> m (Event a)) -> m (Event (Map k a))
263+
264+-- As above, but there is a "current key", and the widget constructor gets a Dynamic Bool indicating if that widget
265+-- is currently selected. The returned Event fires when any of the widgets' returned Events fire, and returns the key
266+-- of an arbitrary firing widget.
267+[W] selectViewListWithKey_ :: Ord k => Dynamic k -> Dynamic (Map k v) -> (k -> Dynamic v -> Dynamic Bool -> m (Event a)) -> m (Event k)
268+
269+-- tableDynAttr
270+-- tabDisplay
271+-- workflow
272+-- workflowView
273+```
274+
275+### Connecting to the real world (I/O)
276+
277+#### Input: Creating Events from user input
278+
279+```haskell
280+-- Extract the specified Event from an 'El'. The allowable event names, and their corresponding
281+-- data types, are listed in Reflex/Dom/Widget/Basic.hs
282+[ ] domEvent :: EventName en -> El -> Event (EventResultType en)
283+```
284+
285+#### Output: Performing side-effects in response to Events
286+
287+```haskell
288+-- Run side-effecting actions in Event when it occurs; returned Event contains results.
289+-- Side effects run in (WidgetHost m) monad, which includes [S] and [H] and can also do I/O via liftIO
290+[W] performEvent :: Event (WidgetHost m a) -> m (Event a)
291+
292+-- Just run side-effects; no return Event
293+[W] performEvent_ :: Event (WidgetHost m ()) -> m ()
294+
295+-- Actions are run asynchronously; each action is given a callback to call when it completes
296+[W] performEventAsync :: Event ((a -> IO ()) -> WidgetHost m ()) -> m (Event a)
297+```
298+
299+### Startup
300+
301+```haskell
302+-- Reflex-Dom entry point. Takes a monadic widget-building action of lengthy type and turns it into an IO action.
303+[I] mainWidget :: Widget Spider (Gui Spider (WithWebView SpiderHost) (HostFrame Spider)) () -> IO ()
304+[I] mainWidgetWithHead :: Widget Spider (Gui Spider (WithWebView SpiderHost) (HostFrame Spider)) () -> Widget Spider (Gui Spider (WithWebView SpiderHost) (HostFrame Spider)) () -> IO ()
305+[I] mainWidgetWithCss :: ByteString -> Widget Spider (Gui Spider (WithWebView SpiderHost) (HostFrame Spider)) () -> IO ()
306+
307+-- One-shot Event that is triggered once all initial widgets are built
308+[W] getPostBuild :: m (Event ())
196309```