| Safe Haskell | Safe-Inferred |
|---|
Control.InjFun
- data InjFun c i m o
- cfapply :: InjFun c i m o -> c -> i -> m o
- inject :: (c -> i -> m o) -> InjFun c i m o
- explode :: Monad m => InjFun c i m (o0, o1) -> (InjFun c i m o0, InjFun c i m o1)
- merge :: Monad m => InjFun c0 i0 m o0 -> InjFun c1 i1 m o1 -> InjFun (c0, c1) (i0, i1) m (o0, o1)
- (||->) :: Monad m => InjFun c i m o -> InjFun c' o m o' -> InjFun (c, c') i m o'
- (|->) :: Monad m => InjFun c i m o -> InjFun c o m o' -> InjFun c i m o'
- (-<) :: Monad m => InjFun c i m (o0, o1) -> (InjFun c' o0 m o0', InjFun c'' o1 m o1') -> (InjFun (c, c') i m o0', InjFun (c, c'') i m o1')
- (-<|) :: Monad m => InjFun c i m (o0, o1) -> (InjFun c o0 m o0', InjFun c o1 m o1') -> (InjFun c i m o0', InjFun c i m o1')
- (>-) :: Monad m => (InjFun c0 i0 m o0, InjFun c1 i1 m o1) -> InjFun c2 (o0, o1) m o' -> InjFun (c0, c1, c2) (i0, i1) m o'
- (>-|) :: Monad m => (InjFun c i0 m o0, InjFun c i1 m o1) -> InjFun c (o0, o1) m o' -> InjFun c (i0, i1) m o'
Inject function
Function able to be injected parameters in.
c is the injected control parameters, i represents its input, m is the resulting monad
and o is the output.
cfapply :: InjFun c i m o -> c -> i -> m oSource
Feed a InjFun with its regular parameters and injected parameters.
Exploding and merging
Arguments
| :: Monad m | |
| => InjFun c0 i0 m o0 | First function |
| -> InjFun c1 i1 m o1 | Second function |
| -> InjFun (c0, c1) (i0, i1) m (o0, o1) | Merged function |
Merge two InjFun into one.
Combinators
Arguments
| :: Monad m | |
| => InjFun c i m (o0, o1) | Function to explode |
| -> (InjFun c' o0 m o0', InjFun c'' o1 m o1') | Functions to feed |
| -> (InjFun (c, c') i m o0', InjFun (c, c'') i m o1') | Exploded and fed functions |
Explode an InjFun and feed two other ones with exploded parts of it.
In that version, each of the three functions has its own inject parameter.
Arguments
| :: Monad m | |
| => InjFun c i m (o0, o1) | Function to explode |
| -> (InjFun c o0 m o0', InjFun c o1 m o1') | Functions to feed |
| -> (InjFun c i m o0', InjFun c i m o1') | Exploded and fed functions |
Explode an InjFun and feed two other ones with exploded parts of it.
In that version, all the three functions share the same inject parameter.
Arguments
| :: Monad m | |
| => (InjFun c0 i0 m o0, InjFun c1 i1 m o1) | Functions to merge |
| -> InjFun c2 (o0, o1) m o' | Function to feed |
| -> InjFun (c0, c1, c2) (i0, i1) m o' | Merged and fed function |
Merge two InjFun and feed another one with the merged function.
In that version, each of the three functions has it its own inject parameter.
Arguments
| :: Monad m | |
| => (InjFun c i0 m o0, InjFun c i1 m o1) | Functions to merge |
| -> InjFun c (o0, o1) m o' | Function to feed |
| -> InjFun c (i0, i1) m o' | Merged and fed function |
Merge two InjFun and feed another one with the merged function.
In that version, all the three functions share the same inject parameter.