configuration-tools-0.3.0: Tools for specifying and parsing configurations

Configuration.Utils.Validation

Description

Utilities for validating configuration values

Synopsis

Documentation

type ConfigValidation α λ = forall μ. (MonadIO μ, Functor μ, Applicative μ, MonadError Text μ, MonadWriterText) μ) => α -> μ () Source #

A validation function. The type in the MonadWriter is excpected to be a Foldable structure for collecting warnings.

Networking

Arguments

 :: MonadError Text m => Text configuration property name that is used in the error message -> String -> m ()

Validates that a value is an HTTP or HTTPS URL

Arguments

 :: MonadError Text m => Text configuration property name that is used in the error message -> String -> m ()

Validates that a value is an HTTP URL

Arguments

 :: MonadError Text m => Text configuration property name that is used in the error message -> String -> m ()

Validates that a value is an HTTPS URL

Arguments

 :: MonadError Text m => Text configuration property name that is used in the error message -> String -> m ()

Validates that a value is an URI without a fragment identifier

Arguments

 :: MonadError Text m => Text configuration property name that is used in the error message -> String -> m ()

Validates that a value is an absolute URI without a fragment identifier

Arguments

 :: MonadError Text m => Text configuration property name that is used in the error message -> String -> m ()

Validates that a value is an absolute URI with an optional fragment identifier

Arguments

 :: MonadError Text m => Text configuration property name that is used in the error message -> String -> m ()

Arguments

 :: MonadError Text m => Text configuration property name that is used in the error message -> String -> m ()

Arguments

 :: (MonadError Text m, Integral n, Show n) => Text configuration property name that is used in the error message -> n -> m ()

Monoids, Foldables and Co

Arguments

 :: (MonadError Text m, Eq α, Monoid α) => Text configuration property name that is used in the error message -> α -> m ()

Arguments

 :: (MonadError Text m, Foldable φ) => Text configuration property name that is used in the error message -> Int exact length of the validated value -> φ α -> m ()

Arguments

 :: (MonadError Text m, Foldable φ) => Text configuration property name that is used in the error message -> Int minimum length of the validated value -> φ α -> m ()

Arguments

 :: (MonadError Text m, Foldable φ) => Text configuration property name that is used in the error message -> Int maximum length of the validated value -> φ α -> m ()

Arguments

 :: (MonadError Text m, Foldable φ) => Text configuration property name that is used in the error message -> Int minimum length of the validated value -> Int maximum length of the validated value -> φ α -> m ()

Files

Arguments

 :: MonadError Text m => Text configuration property name that is used in the error message -> FilePath -> m ()

Arguments

 :: (MonadError Text m, MonadIO m) => Text configuration property name that is used in the error message -> FilePath -> m ()

Arguments

 :: (MonadError Text m, MonadIO m) => Text configuration property name that is used in the error message -> FilePath -> m ()

Arguments

 :: (MonadError Text m, MonadIO m) => Text configuration property name that is used in the error message -> FilePath -> m ()

Arguments

 :: (Functor m, MonadError Text m, MonadIO m) => Text configuration property name that is used in the error message -> FilePath -> m ()

Validates if the given executable name can be found in the system and can be executed.

Arguments

 :: (MonadError Text m, MonadIO m) => Text configuration property name that is used in the error message -> FilePath -> m ()

validateConfigFile :: (MonadIO m, MonadError Text m) => String -> m () Source #

Validate that the input is a config file

Boolean Values

Arguments

 :: MonadError Text m => Text configuration property name that is used in the error message -> Bool -> m ()

Arguments

 :: MonadError Text m => Text configuration property name that is used in the error message -> Bool -> m ()

Arguments

 :: MonadError Text m => Text configuration property name that is used in the error message -> Bool expected value -> Bool -> m ()

Numeric Values

Arguments

 :: (MonadError Text m, Ord α, Num α) => Text configuration property name that is used in the error message -> α -> m ()

Arguments

 :: (MonadError Text m, Ord α, Num α) => Text configuration property name that is used in the error message -> α -> m ()

Arguments

 :: (MonadError Text m, Ord α, Num α) => Text configuration property name that is used in the error message -> α -> m ()

Arguments

 :: (MonadError Text m, Ord α, Num α) => Text configuration property name that is used in the error message -> α -> m ()

Arguments

 :: (MonadError Text m, Eq α, Num α) => Text configuration property name that is used in the error message -> α -> m ()

Orders

Arguments

 :: (MonadError Text m, Ord α, Show α) => Text configuration property name that is used in the error message -> α a strict upper bound for the configuration value -> α -> m ()

Arguments

 :: (MonadError Text m, Ord α, Show α) => Text configuration property name that is used in the error message -> α a upper bound for the configuration value -> α -> m ()

Arguments

 :: (MonadError Text m, Ord α, Show α) => Text configuration property name that is used in the error message -> α a strict lower bound for the configuration value -> α -> m ()

Arguments

 :: (MonadError Text m, Ord α, Show α) => Text configuration property name that is used in the error message -> α a lower bound for the configuration value -> α -> m ()

Arguments

 :: (MonadError Text m, Ord α, Show α) => Text configuration property name that is used in the error message -> (α, α) the valid range for the configuration value -> α -> m ()