[Haskell-cafe] Encoding-aware System.Directory functions

John Millikin jmillikin at gmail.com
Thu Mar 31 04:58:14 CEST 2011


On Wednesday, March 30, 2011 12:18:48 PM UTC-7, Bas van Dijk wrote:

> It would also be great to have a package which combines the proper
> encoding/decoding of filepaths of the system-filepath package with the
> type-safety of the pathtype package:
> http://hackage.haskell.org/package/pathtype
>
 Does that package actually work well? I don't see how it can; it's not 
possible to determine whether a path like "/foo/bar" or "C:\foo\bar" refers 
to a file or directory, so any user input has to be [[ Path ar fd ]]. And 
since the filesystem's out of our control, even functions like [[ checkType 
:: Path ar fd -> IO (Either (FilePath ar) (DirPath ar)) can't provide any 
meaningful result. And that's before getting into UNIX symlinks, which can 
be files and directories at the same time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110330/6429f4b3/attachment.htm>


More information about the Haskell-Cafe mailing list