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

Safe HaskellSafe
LanguageHaskell2010

Control.Flipper.Types

Description

 

Synopsis

Documentation

newtype Features Source #

An abstraction representing the current state of the features store.

Constructors

Features 

class Monad m => HasFeatureFlags m where Source #

The HasFeatureFlags typeclass describes how to access the Features store within the current monad.

Methods

getFeatures :: m Features Source #

getFeatures access the Features store within the current monad

getFeatures :: (MonadTrans t, HasFeatureFlags m1, m ~ t m1) => m Features Source #

getFeatures access the Features store within the current monad

getFeature :: FeatureName -> m (Maybe Bool) Source #

getFeature access a single Feature within the current monad

getFeature :: (MonadTrans t, HasFeatureFlags m1, m ~ t m1) => FeatureName -> m (Maybe Bool) Source #

getFeature access a single Feature within the current monad

class HasFeatureFlags m => ModifiesFeatureFlags m where Source #

The ModifiesFeatureFlags typeclass describes how to modify the Features store within the current monad.

Methods

updateFeatures :: Features -> m () Source #

updateFeatures modifies the Features store within the current monad

updateFeatures :: (MonadTrans t, ModifiesFeatureFlags m1, m ~ t m1) => Features -> m () Source #

updateFeatures modifies the Features store within the current monad

updateFeature :: FeatureName -> Bool -> m () Source #

updateFeature modifies a single Feature within the current monad

updateFeature :: (MonadTrans t, ModifiesFeatureFlags m1, m ~ t m1) => FeatureName -> Bool -> m () Source #

updateFeature modifies a single Feature within the current monad

update :: ModifiesFeatureFlags m => FeatureName -> (Maybe Bool -> Maybe Bool) -> m () Source #

Updates a single Feature within the current monad

mkFeatures :: Map FeatureName Bool -> Features Source #

Convienience constructor