Skip to content

Commit d7fdebc

Browse files
committed
Rename liftSignalFunction to liftSF
1 parent 00fbc6e commit d7fdebc

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

docs/Flare.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,18 +292,18 @@ lift :: forall e a. Eff (chan :: Chan, dom :: DOM | e) (Signal a) -> UI e a
292292

293293
Lift a `Signal` inside the `Eff` monad to a `UI` component.
294294

295-
#### `liftSignalFunction`
295+
#### `liftSF`
296296

297297
``` purescript
298-
liftSignalFunction :: forall e a b. (Signal a -> Signal b) -> UI e a -> UI e b
298+
liftSF :: forall e a b. (Signal a -> Signal b) -> UI e a -> UI e b
299299
```
300300

301301
Lift a function from `Signal a` to `Signal b` to a function from
302302
`UI e a` to `UI e b` without affecting the components. For example:
303303

304304
``` purescript
305305
dropRepeats :: forall e a. (Eq a) => UI e a -> UI e a
306-
dropRepeats = liftSignalFunction S.dropRepeats
306+
dropRepeats = liftSF S.dropRepeats
307307
```
308308

309309
#### `foldp`

html/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ <h3>Example 16: Using other Signal functions (here: since)</h3>
209209
where arg | on = A.className "on"
210210
| otherwise = mempty
211211

212-
ui = light <$> liftSignalFunction (since 1000.0) (button "Switch on" unit unit)
212+
ui = light <$> liftSF (since 1000.0) (button "Switch on" unit unit)
213213
</pre>
214214
<div id="controls16"></div>
215215
<div id="output16"></div>

src/Flare.purs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module Flare
3030
, (<**>)
3131
, wrap
3232
, lift
33-
, liftSignalFunction
33+
, liftSF
3434
, foldp
3535
, runFlareWith
3636
, runFlare
@@ -296,20 +296,20 @@ lift msig = UI $ do
296296
-- |
297297
-- | ``` purescript
298298
-- | dropRepeats :: forall e a. (Eq a) => UI e a -> UI e a
299-
-- | dropRepeats = liftSignalFunction S.dropRepeats
299+
-- | dropRepeats = liftSF S.dropRepeats
300300
-- | ```
301-
liftSignalFunction :: forall e a b. (S.Signal a -> S.Signal b)
302-
-> UI e a
303-
-> UI e b
304-
liftSignalFunction f (UI setup) = UI do
301+
liftSF :: forall e a b. (S.Signal a -> S.Signal b)
302+
-> UI e a
303+
-> UI e b
304+
liftSF f (UI setup) = UI do
305305
(Flare comp sig) <- setup
306306
return $ Flare comp (f sig)
307307

308308
-- | Create a past dependent component. The fold-function takes the current
309309
-- | value of the component and the previous value of the output to produce
310310
-- | the new value of the output.
311311
foldp :: forall a b e. (a -> b -> b) -> b -> UI e a -> UI e b
312-
foldp f x0 = liftSignalFunction (S.foldp f x0)
312+
foldp f x0 = liftSF (S.foldp f x0)
313313

314314
-- | Renders a Flare UI to the DOM and sets up all event handlers. The ID
315315
-- | specifies the HTML element to which the controls are attached. The

test/Main.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ light on = H.with H.div arg mempty
168168
where arg | on = A.className "on"
169169
| otherwise = mempty
170170

171-
ui16 = light <$> liftSignalFunction (since 1000.0) (button "Switch on" unit unit)
171+
ui16 = light <$> liftSF (since 1000.0) (button "Switch on" unit unit)
172172

173173

174174
-- Render everything to the DOM

0 commit comments

Comments
 (0)