Addition to unix: raw ByteString APIs

Simon Marlow marlowsd at
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.


commit d5e43be90d3c6f8869dd2b0c65800c9a6dd0ac70
Author: Simon Marlow <marlowsd at>
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.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Provide-a-raw-ByteString-version-of-FilePath-and-env.patch
URL: <>

More information about the Libraries mailing list