From 34c7bf896f19b182cf6fa104e057f1df9df1254a Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Fri, 11 Nov 2011 16:18:48 +0000 Subject: Provide a raw ByteString version of FilePath and environment APIs The new module System.Posix.ByteString provides exactly the same API as System.Posix, except that: - There is a new type: RawFilePath = ByteString - All functions mentioning FilePath in the System.Posix API use RawFilePath in the System.Posix.ByteString API - RawFilePaths are not subject to Unicode locale encoding and decoding, unlike FilePaths. They are the exact bytes passed to and returned from the underlying POSIX API. - Similarly for functions that deal in environment strings (System.Posix.Env): these use untranslated ByteStrings in System.Posix.Environment - There is a new function System.Posix.ByteString.getArgs :: [ByteString] returning the raw untranslated arguments as passed to exec() when the program was started. --- System/Posix.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'System/Posix.hs') diff --git a/System/Posix.hs b/System/Posix.hs index ad51792..7ad88a2 100644 --- a/System/Posix.hs +++ b/System/Posix.hs @@ -30,7 +30,10 @@ module System.Posix ( module System.Posix.User, module System.Posix.Resource, module System.Posix.Semaphore, - module System.Posix.SharedMem + module System.Posix.SharedMem, + module System.Posix.DynamicLinker, +-- XXX 'Module' type clashes with GHC +-- module System.Posix.DynamicLinker.Module ) where import System.Posix.Types @@ -48,6 +51,9 @@ import System.Posix.User import System.Posix.Resource import System.Posix.Semaphore import System.Posix.SharedMem +-- XXX: bad planning, we have two constructors called "Default" +import System.Posix.DynamicLinker hiding (Default) +--import System.Posix.DynamicLinker.Module {- TODO -- cgit v1.2.3