-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Load environment variables from a file.
--   
--   Parse a .env file and load any declared variables into the current
--   process's environment. This allows for a .env file to specify
--   development-friendly defaults for configuration values normally set in
--   the deployment environment.
@package load-env
@version 0.2.1.0

module LoadEnv.Parse
type Environment = [Variable]
type Variable = (String, String)
parseEnvironment :: Parser Environment
parseVariable :: Parser Variable


-- | This is effectively a port of dotenv, whose README explains it best:
--   
--   <pre>
--   Storing configuration in the environment is one of the tenets of a
--   twelve-factor app. Anything that is likely to change between deployment
--   environments–such as resource handles for databases or credentials for
--   external services–should be extracted from the code into environment
--   variables.
--   
--   But it is not always practical to set environment variables on development
--   machines or continuous integration servers where multiple projects are run.
--   dotenv loads variables from a .env file into ENV when the environment is
--   bootstrapped.
--   </pre>
--   
--   <a>https://github.com/bkeepers/dotenv</a>
--   
--   This library exposes functions for doing just that.
module LoadEnv

-- | <pre>
--   <a>loadEnvFrom</a> ".env"
--   </pre>
loadEnv :: IO ()

-- | Parse the given file and set variables in the process's environment
--   
--   Variables can be declared in the following form:
--   
--   <pre>
--   FOO=bar
--   FOO="bar"
--   FOO='bar'
--   </pre>
--   
--   Declarations may optionally be preceded by <tt>"export "</tt>, which
--   will be ignored. Trailing whitespace is ignored. Quotes inside quoted
--   values or spaces in unquoted values must be escaped with a backlash.
--   Invalid lines are silently ignored.
--   
--   <b>NOTE</b>: If the file-name is relative, the directory tree will be
--   traversed up to <tt>/</tt> looking for the file in each parent. Use
--   <tt><a>loadEnvFromAbsolute</a></tt> to avoid this.
loadEnvFrom :: FilePath -> IO ()

-- | <tt><a>loadEnvFrom</a></tt>, but don't traverse up the directory tree
loadEnvFromAbsolute :: FilePath -> IO ()
