System.FilePath propsal (Was: Cabal feedback notes)

Graham Klyne GK at ninebynine.org
Fri Oct 29 03:10:33 EDT 2004


I guess this begs the question of whether the path manipulation functions 
should be purely syntactic, or should also take account of the file system 
as-is (in which case, they should be in the IO monad, no?).

I have my preference for purely syntactic processing, but the issue needs 
to be determined by actual needs.

#g
--

At 13:38 28/10/04 -0700, diatchki at cse.ogi.edu wrote:
>Hello,
>
>Appologies if someone already noticed this,
>but the 'normalize' function does not seem quite correct
>(at least on Unix like machines).
>
>The problem is that ".." behaves weird when links are used.
>When you get somewhere via a link, and then use ".."
>you end up above the directory that the link pointed to.
>This is probably best illustrated with an example:
>
>-- Suppose that I am in my home directory:
>
> >pwd
>/home/diatchki
>
>-- Now I create a link that points to /usr/local
> >ln -s /usr/local test
>
>-- This makes a link in my current directory that points to /usr/local
>-- Now I type the following command:
>
> >cd test/..
>
>Now if test was not a link, this does nothing and I should still
>be in my home directory. However since 'test' is a link, I actually end
>up in /usr.
>
>I happen to think that this is not very nice, but I think most utilities
>probably conform to this rule, so perhaps so should we.
>
>-Iavor
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>_______________________________________________
>Libraries mailing list
>Libraries at haskell.org
>http://www.haskell.org/mailman/listinfo/libraries

------------
Graham Klyne
For email:
http://www.ninebynine.org/#Contact



More information about the Libraries mailing list