announcing darcs

Keith Wansbrough Keith.Wansbrough@cl.cam.ac.uk
Thu, 10 Apr 2003 10:12:12 +0100


> This reminds me of a library I have been wanting for a while:
> functions for manipulating filenames in a portable way.  The main
> requirement is that you should be able to manipulate a filepath as
> though it was structured something like so:
> 
>   (Maybe [Directory], Maybe Filename, Maybe Suffix)

(I think you mean Filename, not Maybe Filename)

> For example, on a Unix system, /usr/lib/libcurl.so would be
> treated something like this:
> 
>   (Just ["/","usr","lib"], "libcurl", Just "so")

The "/" would be a wart... it would be better to have an "origin"
component, which could be either Absolute or Relative.

   (Origin, Maybe [Directory], Filename, Maybe Suffix)

Something else that should be handled is scp-style remote paths: Maybe
Machine, as in "astrocyte:/tmp/myfile.txt":

  (Just "astrocyte", Absolute, Just "tmp", "myfile", Just "txt")

--KW 8-)