Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- data Fx a where
- runFx :: Fx a -> IO (Maybe a)
- sPrint :: Show a => SFlow a (Fx b)
- sPutStrLn :: SFlow String (Fx b)
- sMax :: Ord x => SFlow x x
- sMaxHS :: Ord x => Maybe x -> SFlow x x
- sMin :: Ord x => SFlow x x
- sMinHS :: Ord x => Maybe x -> SFlow x x
- sSum :: Num n => SFlow n n
- sSumHS :: Num n => Maybe n -> SFlow n n
- sProduct :: Num n => SFlow n n
- sProductHS :: Num n => Maybe n -> SFlow n n
- sAnd :: SFlow Bool Bool
- sOr :: SFlow Bool Bool
- sAny :: (a -> Bool) -> SFlow a Bool
- sAnyHS :: (a -> Bool) -> Maybe Bool -> SFlow a Bool
- sAll :: (a -> Bool) -> SFlow a Bool
- sAllHS :: (a -> Bool) -> Maybe Bool -> SFlow a Bool
- sMappend :: Monoid x => SFlow x x
- sMappendHS :: Monoid x => Maybe x -> SFlow x x
- sMappendL :: Monoid x => SFlow x x
- sMappendLHS :: Monoid x => Maybe x -> SFlow x x
- sMappendR :: Monoid x => SFlow x x
- sMappendRHS :: Monoid x => Maybe x -> SFlow x x
- sToList :: SFlow a [a]
- sToListHS :: Maybe [a] -> SFlow a [a]
- sElem :: Eq x => x -> SFlow x Bool
- sNotElem :: Eq x => x -> SFlow x Bool
- sMapMaybe :: state -> (update -> Maybe state) -> SFlow update state
- sFilterWDefault :: (b -> Bool) -> b -> SFlow b b
- sFoldHS :: c -> (a -> c -> c) -> Maybe c -> SFlow a c
- sCountJust :: Num n => SFlow (Maybe a) n
- sCountJustHS :: Num n => Maybe n -> SFlow (Maybe a) n
- sCountJustBy :: Num n => n -> SFlow (Maybe a) n
- sCountJustByHS :: Num n => n -> Maybe n -> SFlow (Maybe a) n
- sCountFires :: Num n => SFlow x n
- sCountFiresBy :: Num n => n -> SFlow x n
- sCountFiresByHS :: Num n => n -> Maybe n -> SFlow x n
Representations of IO Action Outputs
Representation of side-effecting actions. Usually the final result of the FRP graph
Handy Signal Flow Nodes
Numbers
Booleans and Predicates
sAnd :: SFlow Bool Bool Source #
Return True if all input signal values have been True, otherwise False
sAny :: (a -> Bool) -> SFlow a Bool Source #
Return True if any input signals have passed the predicate, False otherwise
sAll :: (a -> Bool) -> SFlow a Bool Source #
Return True if all input signals have passed the predicate, False otherwise
Monoids
"List" functions
sToList :: SFlow a [a] Source #
Returns list of all values - at the head of the list is the most-recent element
sElem :: Eq x => x -> SFlow x Bool Source #
Return True if the input signal has ever contained the element, else False
sNotElem :: Eq x => x -> SFlow x Bool Source #
Return True if the input signal has never contained the element, else False
sFilterWDefault :: (b -> Bool) -> b -> SFlow b b Source #
sFoldHS :: c -> (a -> c -> c) -> Maybe c -> SFlow a c Source #
Hot-swap in a fold function
First argument is the default value, in case the graph you're replacing hasn't fired at all yet
Counts
sCountJustHS :: Num n => Maybe n -> SFlow (Maybe a) n Source #
Hotswap version of sCountJust
sCountJustBy :: Num n => n -> SFlow (Maybe a) n Source #
countJust
by steps -- e.g. [0,3,6]
instead of [0,1,2]
sCountJustByHS :: Num n => n -> Maybe n -> SFlow (Maybe a) n Source #
Hotswap version of sCountJustBy
sCountFires :: Num n => SFlow x n Source #
Count of all values -- essentially the number of times the SFlow has fired
(If you want to count e.g. what's passed the predicate in sFilter
, use
sCountJust
instead)
sCountFiresBy :: Num n => n -> SFlow x n Source #