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

Safe HaskellSafe
LanguageHaskell2010

Control.Flipper

Description

 

Synopsis

Documentation

enabled :: HasFeatureFlags m => FeatureName -> m Bool Source #

The enabled function returns a Bool indicating if the queried feature is active.

When the queried FeatureName exists, the active state is returned.

When the queried FeatureName does not exists, enabled returns False.

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.