makeRelative
Ben Millwood
haskell at benmachine.co.uk
Sun Sep 30 16:24:14 CEST 2012
On Fri, Sep 28, 2012 at 9:16 PM, Herbert Valerio Riedel <hvr at gnu.org> wrote:
> I don't know whether this might the reason (or whether it is relevant at
> all for the API at hand) but you can't implement this function properly
> w/o turning it into an IO action, since you need to be able to
> introspect the filesystem, because under POSIX at least, you can easily
> construct a filesystem, which exhibits the following confusing
> behaviour:
I have two comments on this behaviour:
1. "confusing" is not the same as "wrong"
2. surely this issue can be avoided by using something like
System.Directory.canoncalizePath before calling makeRelative. I think
doing things that way would separate the pure and IO parts of the
algorithm much better, and allow users to ignore the possibility of
symlinks when that was appropriate for their use.
More information about the Libraries
mailing list