Copyright | (c) Andrey Mulik 2019 |
---|---|
License | BSD-style |
Maintainer | work.a.mulik@gmail.com |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
SDP.SafePrelude module re-exports common Prelude definitions except
those overridden in this library and its extensions (e.g. sdp-io
).
In addition, this module re-exports the most common definitions from other
base
and sdp
modules (Control.Applicative, Data.Bufunctor,
SDP.Estimate, etc.) and some useful combinators that were used in this
library and may be useful to its users.
Import Prelude without conflicting functions, may require additional imports for functions overridden in other modules:
import Prelude () import SDP.SafePrelude
Synopsis
- (?) :: Bool -> a -> a -> a
- (?+) :: (a -> Bool) -> (a -> b) -> a -> Maybe b
- (?-) :: (a -> Bool) -> (a -> b) -> a -> Maybe b
- (?:) :: Maybe a -> [a] -> [a]
- (+?) :: a -> Maybe a -> a
- (...) :: (c -> d) -> (a -> b -> c) -> a -> b -> d
- (?^) :: Monad m => m Bool -> m a -> m a -> m a
- (<=<<) :: Monad m => (c -> m d) -> (a -> b -> m c) -> a -> b -> m d
- (>>=>) :: Monad m => (a -> b -> m c) -> (c -> m d) -> a -> b -> m d
- (>>=<<) :: Monad m => m a -> m b -> (a -> b -> m c) -> m c
- liftA4 :: Applicative t => (a -> b -> c -> d -> e) -> t a -> t b -> t c -> t d -> t e
- liftA5 :: Applicative t => (a -> b -> c -> d -> e -> f) -> t a -> t b -> t c -> t d -> t e -> t f
- liftA6 :: Applicative t => (a -> b -> c -> d -> e -> f -> g) -> t a -> t b -> t c -> t d -> t e -> t f -> t g
- liftM6 :: Monad m => (a -> b -> c -> d -> e -> f -> g) -> m a -> m b -> m c -> m d -> m e -> m f -> m g
- stToMIO :: MonadIO io => ST RealWorld e -> io e
Documentation
(?) :: Bool -> a -> a -> a infixr 1 Source #
Ternary operator.
(odd 1 ? "is True" $ "is False") == "is True"
(<=<<) :: Monad m => (c -> m d) -> (a -> b -> m c) -> a -> b -> m d Source #
Monadic version of (
....
)
(>>=>) :: Monad m => (a -> b -> m c) -> (c -> m d) -> a -> b -> m d Source #
Monadic vesion of (
with reversed arguments....
)
liftA4 :: Applicative t => (a -> b -> c -> d -> e) -> t a -> t b -> t c -> t d -> t e Source #
Very useful combinator.
liftA5 :: Applicative t => (a -> b -> c -> d -> e -> f) -> t a -> t b -> t c -> t d -> t e -> t f Source #
Very very useful combinator
liftA6 :: Applicative t => (a -> b -> c -> d -> e -> f -> g) -> t a -> t b -> t c -> t d -> t e -> t f -> t g Source #
An even more useful combinator.