Skip to content

Commit 41b9eaa

Browse files
authored
Merge pull request #366 from alexfmpe/quickref-runwithreplace
Mention 'runWithReplace' in quickref
2 parents 5bbfe7d + a2b284d commit 41b9eaa

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

Quickref.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,15 @@ For Events, the returned Event fires whenever the latest Event supplied by the w
198198
The functions mentioned above are used to create a static FRP network.
199199
There are additional typeclasses that can be used to modify the FRP network, to have it interact with IO action, or to introspect the building of the network.
200200

201-
Th typeclasses and their associated annotations include:
201+
The typeclasses and their associated annotations include:
202202

203203
- `PostBuild`
204204
Fire an Event when an FRP network has been set up.
205205
```haskell
206206
[B] -- Function runs in any monad supporting PostBuild
207207
```
208208

209-
- `Adjustable`
209+
- `Adjustable`
210210
Use Events to add or remove pieces of an FRP network.
211211
```haskell
212212
[A] -- Function runs in any monad supporting Adjustable
@@ -271,7 +271,7 @@ Th typeclasses and their associated annotations include:
271271
```haskell
272272
-- Run side-effecting actions in Event when it occurs; returned Event contains
273273
-- results. Side effects run in the (Performable m) monad which is associated with
274-
-- the (PerformEvent t m) typeclass constraint.
274+
-- the (PerformEvent t m) typeclass constraint.
275275
-- This allows for working with IO when a ((MonadIO (Performable m)) constraint is available.
276276
[P] performEvent :: Event (Performable m a ) -> m (Event a)
277277

@@ -295,17 +295,20 @@ Th typeclasses and their associated annotations include:
295295
## Networks
296296

297297
```haskell
298-
-- Functions from Reflex.Network used to deal with Dynamics/Events carrying (m a)
298+
-- Functions from Reflex.Adjustable / Reflex.Network used to deal with Dynamics/Events carrying (m a)
299299

300-
-- Given a Dynamic of network-creating actions, create a network that is recreated whenever the Dynamic updates.
301-
-- The returned Event of network results occurs when the Dynamic does. Note: Often, the type a is an Event,
300+
[A] runWithReplace :: m a -> Event t (m b) -> m (a, Event t b)
301+
302+
-- Given a Dynamic of network-creating actions, create a network that is recreated whenever the Dynamic updates.
303+
-- The returned Event of network results occurs when the Dynamic does. Note: Often, the type a is an Event,
302304
-- in which case the return value is an Event-of-Events that would typically be flattened (via switchHold).
303-
[P,A] networkView :: Dynamic (m a) -> m (Event a)
305+
[P,A] networkView :: Dynamic (m a) -> m (Event a)
304306

305-
-- Given an initial network and an Event of network-creating actions, create a network that is recreated whenever the
306-
-- Event fires. The returned Dynamic of network results occurs when the Event does. Note: Often, the type a is an
307+
-- Given an initial network and an Event of network-creating actions, create a network that is recreated whenever the
308+
-- Event fires. The returned Dynamic of network results occurs when the Event does. Note: Often, the type a is an
307309
-- Event, in which case the return value is a Dynamic-of-Events that would typically be flattened.
308-
[H,A] networkHold :: m a -> Event (m a) -> m (Dynamic a)
310+
[H,A] networkHold :: m a -> Event (m a) -> m (Dynamic a)
309311

310312
-- Render a placeholder network to be shown while another network is not yet done building
311-
[P,A] untilReady :: m a -> m b -> m (a, Event b)
313+
[P,A] untilReady :: m a -> m b -> m (a, Event b)
314+
```

0 commit comments

Comments
 (0)