-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Loads environment variables from dotenv files -- -- In most applications, configuration should be separated from -- code. While it usually works well to keep configuration in the -- environment, there are cases where you may want to store configuration -- in a file outside of version control. -- -- Dotenv files have become popular for storing configuration, -- especially in development and test environments. In Ruby, -- Python and Javascript there are libraries to facilitate -- loading of configuration options from configuration files. This -- library loads configuration to environment variables for programs -- written in Haskell. -- -- To use, call loadFile from your application: -- --
-- import Configuration.Dotenv -- loadFile False "/my/dotenvfile" ---- -- This package also includes an executable that can be used to inspect -- the results of applying one or more Dotenv files to the environment, -- or for invoking your executables with an environment after one or more -- Dotenv files is applied. -- -- See the Github page for more information on this package. @package dotenv @version 0.5.2.0 module Configuration.Dotenv.ParsedVariable data ParsedVariable ParsedVariable :: VarName -> VarValue -> ParsedVariable type VarName = String data VarValue Unquoted :: VarContents -> VarValue SingleQuoted :: VarContents -> VarValue DoubleQuoted :: VarContents -> VarValue type VarContents = [VarFragment] data VarFragment VarInterpolation :: String -> VarFragment VarLiteral :: String -> VarFragment CommandInterpolation :: String -> VarFragment interpolateParsedVariables :: [ParsedVariable] -> IO [(String, String)] instance GHC.Classes.Eq Configuration.Dotenv.ParsedVariable.ParsedVariable instance GHC.Show.Show Configuration.Dotenv.ParsedVariable.ParsedVariable instance GHC.Classes.Eq Configuration.Dotenv.ParsedVariable.VarValue instance GHC.Show.Show Configuration.Dotenv.ParsedVariable.VarValue instance GHC.Classes.Eq Configuration.Dotenv.ParsedVariable.VarFragment instance GHC.Show.Show Configuration.Dotenv.ParsedVariable.VarFragment -- | Parser for files in dotenv format. These files generally consist of -- lines with the form key=value. Comments and blank lines are also -- supported. More information on the dotenv format can be found in the -- project README and the test suite. module Configuration.Dotenv.Parse -- | Returns a parser for a Dotenv configuration file. Accepts key and -- value arguments separated by =. Comments in all positions are -- handled appropriately. configParser :: Parser [ParsedVariable] module Configuration.Dotenv.Scheme.Types data EnvType EnvInteger :: EnvType EnvBool :: EnvType EnvText :: EnvType data Env Env :: String -> EnvType -> Bool -> Env [envName] :: Env -> String [envType] :: Env -> EnvType [required] :: Env -> Bool instance GHC.Classes.Eq Configuration.Dotenv.Scheme.Types.Env instance GHC.Show.Show Configuration.Dotenv.Scheme.Types.Env instance GHC.Classes.Eq Configuration.Dotenv.Scheme.Types.EnvType instance GHC.Show.Show Configuration.Dotenv.Scheme.Types.EnvType instance Data.Aeson.Types.FromJSON.FromJSON Configuration.Dotenv.Scheme.Types.Env instance Data.Aeson.Types.FromJSON.FromJSON Configuration.Dotenv.Scheme.Types.EnvType module Configuration.Dotenv.Scheme.Parser parseEnvsWithScheme :: [(String, EnvType)] -> Either [ParseError Char Void] () parseEnvAs :: String -> EnvType -> Either (ParseError Char Void) () showType :: EnvType -> String module Configuration.Dotenv.Scheme.Helpers joinEnvs :: [Env] -> [(String, String)] -> [(Env, (String, String))] matchValueAndType :: [(Env, (String, String))] -> [(String, EnvType)] missingDotenvs :: [Env] -> [(Env, (String, String))] -> [Env] missingSchemeEnvs :: [(String, String)] -> [(Env, (String, String))] -> [(String, String)] sepWithCommas :: [String] -> String showMissingDotenvs :: [Env] -> String showMissingSchemeEnvs :: [(String, String)] -> String -- |