module Amazonka.Core
( module Amazonka.Types,
module Amazonka.Endpoint,
module Amazonka.Data,
module Amazonka.Pager,
module Amazonka.Waiter,
module Amazonka.Error,
(.!@),
may,
)
where
import Amazonka.Data
import Amazonka.Endpoint
import Amazonka.Error
import Amazonka.Pager
import Amazonka.Prelude
import Amazonka.Types
import Amazonka.Waiter
infixl 7 .!@
(.!@) :: Functor f => f (Maybe a) -> a -> f a
f (Maybe a)
f .!@ :: f (Maybe a) -> a -> f a
.!@ a
x = a -> Maybe a -> a
forall a. a -> Maybe a -> a
fromMaybe a
x (Maybe a -> a) -> f (Maybe a) -> f a
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> f (Maybe a)
f
may :: Applicative f => ([a] -> f b) -> [a] -> f (Maybe b)
may :: ([a] -> f b) -> [a] -> f (Maybe b)
may [a] -> f b
_ [] = Maybe b -> f (Maybe b)
forall (f :: * -> *) a. Applicative f => a -> f a
pure Maybe b
forall a. Maybe a
Nothing
may [a] -> f b
f [a]
xs = b -> Maybe b
forall a. a -> Maybe a
Just (b -> Maybe b) -> f b -> f (Maybe b)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [a] -> f b
f [a]
xs