Skip to content

doesDirectoryExist always returns False on Mac OS X

On an Intel MacBook with Mac OS X 10.6.5 (Snow Leopard), with GHC 6.12.3 from a standard Haskell Platform installation, System.Directory.doesDIrectoryExist always returns False for any path.

This issue was first reported here: http://www.haskell.org/pipermail/haskell-cafe/2010-November/086603.html

At that time, several other users on the same platform responded that they were not experiencing the problem. I also tested at that time, and I did not experience the problem.

Now it has started happening here. During the past day I upgraded some basic packages from Hackage, so I suspect that is related.

I have tried it with directory-1.0.1.1 and filepath-1.1.0.4 as originally supplied with the HP install, and also with directory-1.1.0.0 and filepath-1.2.0.0 from hackage, all with the same problem occurring.

One of the packages I upgraded was unix, from 2.4.0.2 to

  1. 4.1.0. I tried hiding the newer version, but when I run

doesDirectoryExist and GHCi loads the directory package, it ignores my hiding and loads the newer unix package. If I both hide the newer unix package and manually specify the older one, GHCi complains about duplicate symbol definitions and departs.

All of that is especially strange, since unix is not even a dependency of directory.

Trac metadata
Trac field Value
Version 6.12.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/directory
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information