{-# LANGUAGE CPP #-}
{-# LANGUAGE NoImplicitPrelude #-}
module System.Etc (
Config
, IConfig
, Value(..)
, getConfigValue
, getConfigValueWith
, getSelectedConfigSource
, getAllConfigSources
, ConfigSource (..)
, ConfigValue
, ConfigSpec
, parseConfigSpec
, readConfigSpec
, readConfigSpecTH
, InvalidConfigKeyPath (..)
, ConfigValueParserFailed (..)
, UnknownConfigKeyFound (..)
, SubConfigEntryExpected (..)
, ConfigValueTypeMismatchFound (..)
, ConfigurationFileNotFound (..)
, UnsupportedFileExtensionGiven (..)
, ConfigInvalidSyntaxFound (..)
, SpecInvalidSyntaxFound (..)
, resolveDefault
, resolveFiles
, resolveEnvPure
, resolveEnv
#ifdef WITH_CLI
, resolvePlainCliPure
, resolveCommandCliPure
, resolvePlainCli
, resolveCommandCli
, getErrorMessage
, CliConfigError(..)
#endif
#ifdef WITH_EXTRA
, renderConfig
, renderConfigColor
, printPrettyConfig
, hPrintPrettyConfig
, EnvMisspell(..)
, getEnvMisspellings
, getEnvMisspellingsPure
, renderEnvMisspellings
, hPrintEnvMisspellings
, reportEnvMisspellingWarnings
#endif
) where
import System.Etc.Internal.Resolver.Default (resolveDefault)
import System.Etc.Internal.Types
(Config, ConfigSource (..), ConfigValue, IConfig (..), Value (..))
import System.Etc.Spec
( ConfigInvalidSyntaxFound (..)
, ConfigSpec
, ConfigValueParserFailed (..)
, ConfigValueTypeMismatchFound (..)
, ConfigurationFileNotFound (..)
, InvalidConfigKeyPath (..)
, SpecInvalidSyntaxFound (..)
, SubConfigEntryExpected (..)
, UnknownConfigKeyFound (..)
, UnsupportedFileExtensionGiven (..)
, parseConfigSpec
, readConfigSpec
, readConfigSpecTH
)
#ifdef WITH_CLI
import System.Etc.Internal.Resolver.Cli.Command (resolveCommandCli, resolveCommandCliPure)
import System.Etc.Internal.Resolver.Cli.Common (CliConfigError (..), getErrorMessage)
import System.Etc.Internal.Resolver.Cli.Plain (resolvePlainCli, resolvePlainCliPure)
#endif
#ifdef WITH_EXTRA
import System.Etc.Internal.Extra.EnvMisspell
( EnvMisspell (..)
, getEnvMisspellings
, getEnvMisspellingsPure
, hPrintEnvMisspellings
, renderEnvMisspellings
, reportEnvMisspellingWarnings
)
import System.Etc.Internal.Extra.Printer
(hPrintPrettyConfig, printPrettyConfig, renderConfig, renderConfigColor)
#endif
import System.Etc.Internal.Config ()
import System.Etc.Internal.Resolver.Env (resolveEnv, resolveEnvPure)
import System.Etc.Internal.Resolver.File (resolveFiles)