diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,7 @@
 Changelog for Extra
 
+1.3.1
+    #9, support directory-1.2.3
 1.3
     Add whenJustM
     Add errorIO
diff --git a/Generate.hs b/Generate.hs
--- a/Generate.hs
+++ b/Generate.hs
@@ -20,7 +20,7 @@
         src <- readFile $ joinPath ("src" : split (== '.') mod) <.> "hs"
         let funcs = filter validIdentifier $ takeWhile (/= "where") $
                     words $ replace "," " " $ drop1 $ dropWhile (/= '(') $
-                    unlines $ filter (not . isPrefixOf "--" . trim) $ lines src
+                    unlines $ filter (\x -> not $ any (`isPrefixOf` trim x) ["--","#"]) $ lines src
         let tests = mapMaybe (stripPrefix "-- > ") $ lines src
         return (mod, funcs, tests)
     writeFileBinaryChanged "src/Extra.hs" $ unlines $
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
 * `Control.Monad.Extra.concatMapM` provides a monadic version of `concatMap`, in the same way that `mapM` is a monadic version of `map`.
 * `Data.Tuple.Extra.fst3` provides a function to get the first element of a triple.
 * `Control.Exception.Extra.retry` provides a function that retries an `IO` action a number of times.
-* `System.Environment.Extra.lookupEnv` is a functional available in GHC 7.6 and above. On GHC 7.6 and above this package reexports the version from `System.Environment` while on GHC 7.4 and below it defines an equivalent version.
+* `System.Environment.Extra.lookupEnv` is a function available in GHC 7.6 and above. On GHC 7.6 and above this package reexports the version from `System.Environment` while on GHC 7.4 and below it defines an equivalent version.
 
 The module `Extra` documents all functions provided by this library. Modules such as `Data.List.Extra` provide extra functions over `Data.List` and also reexport `Data.List`. Users are recommended to replace `Data.List` imports with `Data.List.Extra` if they need the extra functionality.
 
diff --git a/extra.cabal b/extra.cabal
--- a/extra.cabal
+++ b/extra.cabal
@@ -1,7 +1,7 @@
 cabal-version:      >= 1.10
 build-type:         Simple
 name:               extra
-version:            1.3
+version:            1.3.1
 license:            BSD3
 license-file:       LICENSE
 category:           Development
@@ -17,9 +17,10 @@
 bug-reports:        https://github.com/ndmitchell/extra/issues
 tested-with:        GHC==7.10.1, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2
 
-extra-source-files:
+extra-doc-files:
     CHANGES.txt
     README.md
+extra-source-files:
     Generate.hs
 
 source-repository head
diff --git a/src/Control/Exception/Extra.hs b/src/Control/Exception/Extra.hs
--- a/src/Control/Exception/Extra.hs
+++ b/src/Control/Exception/Extra.hs
@@ -115,5 +115,5 @@
 tryBool :: Exception e => (e -> Bool) -> IO a -> IO (Either e a)
 tryBool f a = tryJust (bool f) a
 
-bool :: Exception e => (e -> Bool) -> (e -> Maybe e)
+bool :: (e -> Bool) -> (e -> Maybe e)
 bool f x = if f x then Just x else Nothing
diff --git a/src/Control/Monad/Extra.hs b/src/Control/Monad/Extra.hs
--- a/src/Control/Monad/Extra.hs
+++ b/src/Control/Monad/Extra.hs
@@ -126,7 +126,7 @@
 (&&^) :: Monad m => m Bool -> m Bool -> m Bool
 (&&^) a b = ifM a b (return False)
 
--- | A version of 'any' lifted to a moand. Retains the short-circuiting behaviour.
+-- | A version of 'any' lifted to a monad. Retains the short-circuiting behaviour.
 --
 -- > anyM Just [False,True ,undefined] == Just True
 -- > anyM Just [False,False,undefined] == undefined
@@ -135,7 +135,7 @@
 anyM p [] = return False
 anyM p (x:xs) = ifM (p x) (return True) (anyM p xs)
 
--- | A version of 'all' lifted to a moand. Retains the short-circuiting behaviour.
+-- | A version of 'all' lifted to a monad. Retains the short-circuiting behaviour.
 --
 -- > allM Just [True,False,undefined] == Just False
 -- > allM Just [True,True ,undefined] == undefined
@@ -144,7 +144,7 @@
 allM p [] = return True
 allM p (x:xs) = ifM (p x) (allM p xs) (return False)
 
--- | A version of 'or' lifted to a moand. Retains the short-circuiting behaviour.
+-- | A version of 'or' lifted to a monad. Retains the short-circuiting behaviour.
 --
 -- > orM [Just False,Just True ,undefined] == Just True
 -- > orM [Just False,Just False,undefined] == undefined
@@ -152,7 +152,7 @@
 orM :: Monad m => [m Bool] -> m Bool
 orM = anyM id
 
--- | A version of 'and' lifted to a moand. Retains the short-circuiting behaviour.
+-- | A version of 'and' lifted to a monad. Retains the short-circuiting behaviour.
 --
 -- > andM [Just True,Just False,undefined] == Just False
 -- > andM [Just True,Just True ,undefined] == undefined
diff --git a/src/System/Directory/Extra.hs b/src/System/Directory/Extra.hs
--- a/src/System/Directory/Extra.hs
+++ b/src/System/Directory/Extra.hs
@@ -1,10 +1,22 @@
 {-# LANGUAGE CPP #-}
 
+#ifndef MIN_VERSION_directory
+#if __GLASGOW_HASKELL__ >= 711
+#define MIN_VERSION_directory(a,b,c) 1
+#else
+#define MIN_VERSION_directory(a,b,c) 0
+#endif
+#endif
+
+
 -- | Extra directory functions. Most of these functions provide cleaned up and generalised versions
 --   of 'getDirectoryContents', see 'listContents' for the differences.
 module System.Directory.Extra(
     module System.Directory,
-    withCurrentDirectory, createDirectoryPrivate,
+#if !MIN_VERSION_directory(1,2,3)
+    withCurrentDirectory,
+#endif
+    createDirectoryPrivate,
     listContents, listFiles, listFilesInside, listFilesRecursive
     ) where
 
@@ -19,6 +31,7 @@
 #endif
 
 
+#if !MIN_VERSION_directory(1,2,3)
 -- | Set the current directory, perform an operation, then change back.
 --   Remember that the current directory is a global variable, so calling this function
 --   multithreaded is almost certain to go wrong. Avoid changing the current directory if you can.
@@ -28,6 +41,7 @@
 withCurrentDirectory dir act =
     bracket getCurrentDirectory setCurrentDirectory $ const $ do
         setCurrentDirectory dir; act
+#endif
 
 
 -- | List the files and directories directly within a directory.
