Safe Haskell | None |
---|---|
Language | Haskell2010 |
Include the value of an environment variable in the binary at compile time.
Rationale
Users might want to embed secrets (e.g. API keys, database connection strings) inside production artifacts without checking these into the repository.
Example
import IncludeEnv.TH (includeEnv)
$(includeEnv
"SHELL" "shl")
shl :: String
main :: IO ()
main = putStrLn $ unwords ["your current shell :", shl]
Synopsis
- includeEnv :: String -> String -> Q [Dec]