feature-flipper-0.2.1.2: A minimally obtrusive feature flag library

Safe HaskellNone
LanguageHaskell2010

Control.Flipper.Adapters.Memory

Synopsis

Documentation

newtype FlipperT m a Source #

The FlipperT transformer for in-memory feature switchable computation.

Constructors

FlipperT 

Fields

Instances

MonadTrans FlipperT Source # 

Methods

lift :: Monad m => m a -> FlipperT m a #

Monad m => MonadState Features (FlipperT m) Source # 

Methods

get :: FlipperT m Features #

put :: Features -> FlipperT m () #

state :: (Features -> (a, Features)) -> FlipperT m a #

Monad m => Monad (FlipperT m) Source # 

Methods

(>>=) :: FlipperT m a -> (a -> FlipperT m b) -> FlipperT m b #

(>>) :: FlipperT m a -> FlipperT m b -> FlipperT m b #

return :: a -> FlipperT m a #

fail :: String -> FlipperT m a #

Functor m => Functor (FlipperT m) Source # 

Methods

fmap :: (a -> b) -> FlipperT m a -> FlipperT m b #

(<$) :: a -> FlipperT m b -> FlipperT m a #

Monad m => Applicative (FlipperT m) Source # 

Methods

pure :: a -> FlipperT m a #

(<*>) :: FlipperT m (a -> b) -> FlipperT m a -> FlipperT m b #

(*>) :: FlipperT m a -> FlipperT m b -> FlipperT m b #

(<*) :: FlipperT m a -> FlipperT m b -> FlipperT m a #

MonadIO m => MonadIO (FlipperT m) Source # 

Methods

liftIO :: IO a -> FlipperT m a #

Monad m => ModifiesFeatureFlags (FlipperT m) Source # 
Monad m => HasFeatureFlags (FlipperT m) Source # 

evalFlipperT :: Monad m => Features -> FlipperT m a -> m a Source #

Evaluates a feature-switched computation, returning the final value and discarding the final state of the feature switches.

execFlipperT :: Monad m => Features -> FlipperT m a -> m Features Source #

Executes a feature-switched computation, returning the final state of the feature switches, discarding the final value of the computation.

runFlipperT :: Monad m => Features -> FlipperT m a -> m (a, Features) Source #

Runs a feature-switched computation, returning the final value and state of the feature switches.