behaviour change in getDirectoryContents in GHC 7.2?

John Lask jvlask at
Thu Nov 10 07:54:05 CET 2011

My primary concerns are (in order of priority - and I only speak for myself)

(a) consistency across platforms
(b) minimize (unrequired) performance overhead

I would prefer an api which is consistent for both win32, posix or other 
os which only did as much as what the user (us) wanted
for example ...

module System.Directory.ByteString ...

FilePath = ByteString

getDirectoryContents :: FilePath -> IO [FilePath]

which is the same for both win32 and posix and represents raw 
uninterpreted bytestrings in whatever encoding/(non-encoding) the os 
provides....implicitly it is for the user to know and understand what 
their getting (utf-16 in the case of windows, bytes in case of posix 

then this api can be re-exported with the decoding/encoding by

which would export FilePath=String

ie a two level api...

More information about the Glasgow-haskell-users mailing list