[commit: unix] master: Provide a raw ByteString version of FilePath and environment APIs (34c7bf8)
Simon Marlow
marlowsd at gmail.com
Tue Nov 22 13:37:42 CET 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/unix
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/34c7bf896f19b182cf6fa104e057f1df9df1254a
>---------------------------------------------------------------
commit 34c7bf896f19b182cf6fa104e057f1df9df1254a
Author: Simon Marlow <marlowsd at gmail.com>
Date: Fri Nov 11 16:18:48 2011 +0000
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 +-
System/Posix/ByteString.hs | 69 ++
System/Posix/ByteString/FilePath.hsc | 123 ++++
System/Posix/Directory.hsc | 59 +--
.../{Directory.hsc => Directory/ByteString.hsc} | 98 +---
System/Posix/Directory/Common.hsc | 80 +++
System/Posix/DynamicLinker.hsc | 40 +-
System/Posix/DynamicLinker/ByteString.hsc | 70 ++
.../Common.hsc} | 35 +-
System/Posix/DynamicLinker/Module.hsc | 7 +-
System/Posix/DynamicLinker/Module/ByteString.hsc | 77 +++
System/Posix/DynamicLinker/Prim.hsc | 2 +-
System/Posix/{Env.hsc => Env/ByteString.hsc} | 95 ++--
System/Posix/Files.hsc | 333 +---------
System/Posix/Files/ByteString.hsc | 382 +++++++++++
System/Posix/Files/Common.hsc | 408 +++++++++++
System/Posix/IO.hsc | 400 +-----------
System/Posix/IO/ByteString.hsc | 102 +++
System/Posix/{IO.hsc => IO/Common.hsc} | 33 +-
System/Posix/Process.hsc | 334 +---------
System/Posix/Process/ByteString.hsc | 140 ++++
System/Posix/{Process.hsc => Process/Common.hsc} | 64 +--
System/Posix/{Temp.hsc => Temp/ByteString.hsc} | 35 +-
System/Posix/Terminal.hsc | 710 +-------------------
System/Posix/Terminal/ByteString.hsc | 132 ++++
System/Posix/{Terminal.hsc => Terminal/Common.hsc} | 49 +--
tests/all.T | 6 +
tests/fileStatus.hs | 25 +-
tests/{fileStatus.hs => fileStatusByteString.hs} | 30 +-
tests/{getEnvironment01.hs => getEnvironment02.hs} | 2 +-
...nvironment01.stdout => getEnvironment02.stdout} | 0
unix.cabal | 55 ++-
32 files changed, 1834 insertions(+), 2169 deletions(-)
Diff suppressed because of size. To see it, use:
git show 34c7bf896f19b182cf6fa104e057f1df9df1254a
More information about the Cvs-libraries
mailing list