Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- newtype Features = Features {}
- newtype FeatureName = FeatureName {}
- class Monad m => HasFeatureFlags m where
- class HasFeatureFlags m => ModifiesFeatureFlags m where
- update :: ModifiesFeatureFlags m => FeatureName -> (Maybe Bool -> Maybe Bool) -> m ()
- mkFeatures :: Map FeatureName Bool -> Features
Documentation
An abstraction representing the current state of the features store.
newtype FeatureName Source #
The main identifier of a feature
class Monad m => HasFeatureFlags m where Source #
The HasFeatureFlags
typeclass describes how to access the Features store
within the current monad.
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
Monad m => HasFeatureFlags (FlipperT m) Source # | |
(MonadIO m, HasFeatureFlags m) => HasFeatureFlags (StateT s m) Source # | |
(MonadIO m, HasFeatureFlags m) => HasFeatureFlags (ReaderT * s m) Source # | |
class HasFeatureFlags m => ModifiesFeatureFlags m where Source #
The ModifiesFeatureFlags
typeclass describes how to modify the Features store
within the current monad.
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
Monad m => ModifiesFeatureFlags (FlipperT m) Source # | |
(MonadIO m, ModifiesFeatureFlags m) => ModifiesFeatureFlags (StateT s m) Source # | |
(MonadIO m, ModifiesFeatureFlags m) => ModifiesFeatureFlags (ReaderT * s m) Source # | |
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