diff --git a/hpack.cabal b/hpack.cabal
--- a/hpack.cabal
+++ b/hpack.cabal
@@ -1,9 +1,9 @@
--- This file has been generated from package.yaml by hpack version 0.19.0.
+-- This file has been generated from package.yaml by hpack version 0.19.1.
 --
 -- see: https://github.com/sol/hpack
 
 name:           hpack
-version:        0.19.1
+version:        0.19.2
 synopsis:       An alternative format for Haskell packages
 description:    See README at <https://github.com/sol/hpack#readme>
 category:       Development
diff --git a/src/Hpack/Util.hs b/src/Hpack/Util.hs
--- a/src/Hpack/Util.hs
+++ b/src/Hpack/Util.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE DeriveDataTypeable #-}
 module Hpack.Util (
   List(..)
@@ -116,14 +117,29 @@
 
 expandGlobs :: String -> FilePath -> [String] -> IO ([String], [FilePath])
 expandGlobs name dir patterns = do
-  files <- (fst <$> globDir compiledPatterns dir) >>= mapM removeDirectories
+  files <- globDir_ compiledPatterns dir >>= mapM removeDirectories
   let warnings = [warn pattern | ([], pattern) <- zip files patterns]
   return (warnings, combineResults files)
   where
+    globDir_ :: [Pattern] -> FilePath -> IO [[FilePath]]
+#if MIN_VERSION_Glob(0,9,0)
+    globDir_ = globDir
+#else
+    globDir_ xs = fmap fst . globDir xs
+#endif
+    combineResults :: [[FilePath]] -> [FilePath]
     combineResults = nub . sort . map (toPosixFilePath . makeRelative dir) . concat
+
+    warn :: String -> String
     warn pattern = "Specified pattern " ++ show pattern ++ " for " ++ name ++ " does not match any files"
+
+    compiledPatterns :: [Pattern]
     compiledPatterns = map (compileWith options) patterns
+
+    removeDirectories :: [FilePath] -> IO [FilePath]
     removeDirectories = filterM doesFileExist
+
+    options :: CompOptions
     options = CompOptions {
         characterClasses = False
       , characterRanges = False
