
4 Nov
2009
4 Nov
'09
6:56 a.m.
On Wed, Nov 4, 2009 at 8:00 AM, Simon Marlow
the property doesn't hold any more because dropFileName "foo" == "./". So I worked around cases like this with an internal version of splitFileName with the old semantics. This isn't a big problem - it just means we get to keep some of these nice simple equality properties, which are arguably wrong anyway, and fewer "./" prefixes will show up to surprise users.
If FilePath was a newtype, could its Eq instance not distinguish between "foo" and "./foo"? Note that we must distinguish "./foo/../" of "./" because this may not be valid ("foo" does not exist) or may be something different ("foo" is a symlink). This Eq instance would just eat all superfluous "./". Cheers, -- Felipe.