diff --git a/CHANGELOG.txt b/CHANGELOG.txt
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,9 @@
+0.3.2, 2008-12-20:
+	Regression fix: handle directories without read permissions properly.
+
+	Convenience for developers: -XTemplateHaskell no longer barfs on
+	Compile.hs.
+
 0.3.1, 2008-10-31:
 	Corrected the Cabal-Version field.
 
diff --git a/Glob.cabal b/Glob.cabal
--- a/Glob.cabal
+++ b/Glob.cabal
@@ -1,7 +1,7 @@
 Cabal-Version: >= 1.6
 
 Name:        Glob
-Version:     0.3.1
+Version:     0.3.2
 Homepage:    http://iki.fi/matti.niemenmaa/glob/
 Synopsis:    Globbing library
 Category:    System
diff --git a/System/FilePath/Glob/Directory.hs b/System/FilePath/Glob/Directory.hs
--- a/System/FilePath/Glob/Directory.hs
+++ b/System/FilePath/Glob/Directory.hs
@@ -40,6 +40,9 @@
 --
 -- Any results deeper than in the given directory are enumerated lazily, using
 -- 'unsafeInterleaveIO'.
+--
+-- Directories without read permissions are returned as entries but their
+-- contents, of course, are not.
 globDir :: [Pattern] -> FilePath -> IO ([[FilePath]], [FilePath])
 globDir []   dir = do
    c <- getRecursiveContents dir
diff --git a/System/FilePath/Glob/Optimize.hs b/System/FilePath/Glob/Optimize.hs
--- a/System/FilePath/Glob/Optimize.hs
+++ b/System/FilePath/Glob/Optimize.hs
@@ -62,7 +62,7 @@
       | b > a = go $ CharRange True [Right (a,b)] : xs
 
    go (x:xs) =
-      case find ($x) compressors of
+      case find ($ x) compressors of
            Just c  -> x : go (dropWhile c xs)
            Nothing -> x : go xs
 
diff --git a/System/FilePath/Glob/Utils.hs b/System/FilePath/Glob/Utils.hs
--- a/System/FilePath/Glob/Utils.hs
+++ b/System/FilePath/Glob/Utils.hs
@@ -124,16 +124,17 @@
 #endif
 
 getRecursiveContents :: FilePath -> IO (DList FilePath)
-getRecursiveContents dir = do
-   raw <- getDirectoryContents dir
+getRecursiveContents dir =
+   flip Prelude.catch (\_ -> return $ DL.singleton dir) $ do
 
-   let entries = map (dir </>) (raw \\ [".",".."])
+      raw <- getDirectoryContents dir
 
-   (dirs,files) <- partitionM doesDirectoryExist entries
+      let entries = map (dir </>) (raw \\ [".",".."])
+      (dirs,files) <- partitionM doesDirectoryExist entries
 
-   subs <- unsafeInterleaveIO . mapM getRecursiveContents $ dirs
+      subs <- unsafeInterleaveIO . mapM getRecursiveContents $ dirs
 
-   return$ DL.cons dir (DL.fromList files `DL.append` DL.concat subs)
+      return$ DL.cons dir (DL.fromList files `DL.append` DL.concat subs)
 
 partitionM :: (Monad m) => (a -> m Bool) -> [a] -> m ([a], [a])
 partitionM p_ = foldM (f p_) ([],[])
