-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | UTF-8 aware substitutes for functions in System.Environment -- -- UTF-8 aware substitutes for functions in System.Environment It was -- tested with GHC 6.10.1 in Unix (Linux) environment. Hugs users do not -- need this package. Import System.Environment.UTF8 into your program, -- and use functions like getArgs and getEnv in usual way. UTF8-aware -- locale is expected, that is, environment has setting of LANG = -- en_US.utf8 or similar. @package utf8-env @version 0.1 -- | Miscellaneous information about the system environment, assuming it -- was encoded in UTF-8. To be used as a drop-in replacement for -- System.Environment module System.Environment.UTF8 -- | Computation getArgs returns a list of the program's command -- line arguments (not including the program name). getArgs :: IO [String] -- | Computation getProgName returns the name of the program as it -- was invoked. -- -- However, this is hard-to-impossible to implement on some non-Unix -- OSes, so instead, for maximum portability, we just return the leafname -- of the program as invoked. Even then there are some differences -- between platforms: on Windows, for example, a program invoked as foo -- is probably really FOO.EXE, and that is what -- getProgName will return. getProgName :: IO String -- | Computation getEnv var returns the value of the -- environment variable var. -- -- This computation may fail with: -- -- getEnv :: String -> IO String -- | withArgs args act - while executing action -- act, have getArgs return args. withArgs :: [String] -> IO a -> IO a -- | withProgName name act - while executing action -- act, have getProgName return name. withProgName :: String -> IO a -> IO a -- | getEnvironment retrieves the entire environment as a list of -- (key,value) pairs. -- -- If an environment entry does not contain an '=' character, -- the key is the whole entry and the value is the -- empty string. getEnvironment :: IO [(String, String)]