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. --- unix.cabal | 55 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 12 deletions(-) (limited to 'unix.cabal') diff --git a/unix.cabal b/unix.cabal index a6f95e4..d07f043 100644 --- a/unix.cabal +++ b/unix.cabal @@ -27,19 +27,10 @@ Cabal-Version: >= 1.6 Library exposed-modules: System.Posix - System.Posix.DynamicLinker.Module - System.Posix.DynamicLinker.Prim - System.Posix.Directory - System.Posix.DynamicLinker - System.Posix.Env + System.Posix.ByteString + System.Posix.Error - System.Posix.Files - System.Posix.IO - System.Posix.Process - System.Posix.Process.Internals System.Posix.Resource - System.Posix.Temp - System.Posix.Terminal System.Posix.Time System.Posix.Unistd System.Posix.User @@ -47,7 +38,47 @@ Library System.Posix.Signals.Exts System.Posix.Semaphore System.Posix.SharedMem - build-depends: base >= 4.2 && < 4.5 + + System.Posix.ByteString.FilePath + + System.Posix.Directory + System.Posix.Directory.ByteString + + System.Posix.DynamicLinker.Module + System.Posix.DynamicLinker.Module.ByteString + System.Posix.DynamicLinker.Prim + System.Posix.DynamicLinker.Common + System.Posix.DynamicLinker.ByteString + System.Posix.DynamicLinker + + System.Posix.Files + System.Posix.Files.ByteString + + System.Posix.IO + System.Posix.IO.ByteString + + System.Posix.Env + System.Posix.Env.ByteString + + System.Posix.Process + System.Posix.Process.Internals + System.Posix.Process.ByteString + + System.Posix.Temp + System.Posix.Temp.ByteString + + System.Posix.Terminal + System.Posix.Terminal.ByteString + + other-modules: + System.Posix.Directory.Common + System.Posix.Files.Common + System.Posix.IO.Common + System.Posix.Process.Common + System.Posix.Terminal.Common + + build-depends: base >= 4.2 && < 4.5, + bytestring >= 0.9.2.0 && < 0.10 extensions: CPP, ForeignFunctionInterface, EmptyDataDecls if impl(ghc >= 7.1) extensions: NondecreasingIndentation -- cgit v1.2.3