Addition to unix: raw ByteString APIs
marlowsd at gmail.com
Fri Nov 11 17:23:26 CET 2011
I propose to commit the attached patch to the unix package and release
it with GHC 7.4.1. The commit log is reproduced below. Comments please!
The unix version number will of course be bumped appropriately.
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
- There is a new function
System.Posix.ByteString.getArgs :: [ByteString]
returning the raw untranslated arguments as passed to exec()
when the program was started.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Libraries