<div>I was very surprised to find &quot;fdRead&quot; returning a String in the ByteString version of the library:</div><div><br></div>   <a href="http://hackage.haskell.org/packages/archive/unix/2.5.1.0/doc/html/System-Posix-IO-ByteString.html">http://hackage.haskell.org/packages/archive/unix/2.5.1.0/doc/html/System-Posix-IO-ByteString.html</a><br>

<br><div>Unlike, for example the fdRead in unix-bytestring:</div><div><br></div><div>   <a href="http://hackage.haskell.org/packages/archive/unix-bytestring/0.3.5/doc/html/System-Posix-IO-ByteString.html">http://hackage.haskell.org/packages/archive/unix-bytestring/0.3.5/doc/html/System-Posix-IO-ByteString.html</a></div>

<div><div><br></div><div>I belatedly found the below thread when trying to figure out what went down with unix-2.5.1.0, and it seems that the impetus for the &quot;.ByteString&quot; modules was to change file path representation, not the representation of file contents.</div>

<div><br></div><div>But I&#39;m missing why this would be.  If it is a distinct module namespace, why would there be any backwards compatibility concerns?  And if taking this one step towards ByteString why not go all the way?  (Especially as file contents are much larger and therefore more performance critical than file names.)</div>

<div><br></div><div>  -Ryan</div><div><br></div><div><br></div><div><br><div class="gmail_quote">On Fri, Nov 11, 2011 at 11:23 AM, Simon Marlow <span dir="ltr">&lt;<a href="mailto:marlowsd@gmail.com">marlowsd@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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!<br>


<br>
The unix version number will of course be bumped appropriately.<br>
<br>
Cheers,<br>
        Simon<br>
<br>
commit d5e43be90d3c6f8869dd2b0c65800c<u></u>9a6dd0ac70<br>
Author: Simon Marlow &lt;<a href="mailto:marlowsd@gmail.com" target="_blank">marlowsd@gmail.com</a>&gt;<br>
Date:   Fri Nov 11 16:18:48 2011 +0000<br>
<br>
    Provide a raw ByteString version of FilePath and environment APIs<br>
<br>
    The new module System.Posix.ByteString provides exactly the same API<br>
    as System.Posix, except that:<br>
<br>
      - There is a new type: RawFilePath = ByteString<br>
<br>
      - All functions mentioning FilePath in the System.Posix API<br>
        use RawFilePath in the System.Posix.ByteString API<br>
<br>
      - RawFilePaths are not subject to Unicode locale encoding and<br>
        decoding, unlike FilePaths.  They are the exact bytes passed to<br>
        and returned from the underlying POSIX API.<br>
<br>
      - Similarly for functions that deal in environment<br>
        strings (System.Posix.Env): these use untranslated ByteStrings<br>
        in System.Posix.Environment<br>
<br>
      - There is a new function<br>
<br>
         System.Posix.ByteString.<u></u>getArgs :: [ByteString]<br>
<br>
        returning the raw untranslated arguments as passed to exec()<br>
        when the program was started.<br>
<br>_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
<br></blockquote></div><br></div></div>