[Haskell-cafe] Relative files paths

Andrew Coppin andrewcoppin at btinternet.com
Sat Sep 11 07:20:08 EDT 2010

Suppose that I'm in foo/bar/box1/top and I want to access a file in 
foo/bar/box2/side. How do I construct the shortest possible relative 
path from one to the other? The filepath package doesn't seem to provide 
a function to do this. (The correct answer is obviously 
"../../box2/side" in this instance, but how do I compute that in general?)

More information about the Haskell-Cafe mailing list