Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- enabled :: HasFeatureFlags m => FeatureName -> m Bool
- enable :: ModifiesFeatureFlags m => FeatureName -> m ()
- disable :: ModifiesFeatureFlags m => FeatureName -> m ()
- toggle :: ModifiesFeatureFlags m => FeatureName -> m ()
- whenEnabled :: HasFeatureFlags m => FeatureName -> m () -> m ()
- module Control.Flipper.Types
Documentation
enabled :: HasFeatureFlags m => FeatureName -> m Bool Source #
enable :: ModifiesFeatureFlags m => FeatureName -> m () Source #
The enable
function activates a feature.
When the FeatureName exists in the store, it is set to active.
When the FeatureName does not exist, it is created and set to active.
disable :: ModifiesFeatureFlags m => FeatureName -> m () Source #
The disable
function deactivates a feature.
When the FeatureName exists in the store, it is set to inactive.
When the FeatureName does not exist, it is created and set to inactive.
toggle :: ModifiesFeatureFlags m => FeatureName -> m () Source #
The toggle
function flips the current state of a feature.
When the FeatureName exists in the store, it flips the feature state.
When the FeatureName does not exist, it is created and set to True.
whenEnabled :: HasFeatureFlags m => FeatureName -> m () -> m () Source #
The whenEnabled
function calls the supplied function, 'm ()', when the given
FeatureName
is enabled.
When the feature specified by FeatureName
is disabled, 'm ()' is not
evaluated.
module Control.Flipper.Types