Abstract FilePath Proposal

Brandon Allbery allbery.b at gmail.com
Sat Jun 27 21:02:12 UTC 2015


On Sat, Jun 27, 2015 at 4:50 PM, Yitzchak Gale <gale at sefer.org> wrote:

> On Mac OS X, it's normalized Unicode. The important
> point is *normalized* - if you create a FilePath from two
> different Unicode strings that have the same normalized
> form, the result FilePaths must be equal on Mac OS X.
>

This is only true for higher level OS X APIs. ghc normally operates in the
BSD layer, which mostly follows POSIX semantics; in particular, filesystem
paths are bytestrings in the BSD layer, and only normalized in Cocoa APIs.
(Which, among other things, means you can make a GUI application dump core
by trying to use a file dialog in a directory containing a filename created
using the BSD API which does not use a UTF8 encoding.)

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20150627/c1acb05e/attachment.html>


More information about the Libraries mailing list