diff --git a/src/Database/YeshQL/Util.hs b/src/Database/YeshQL/Util.hs
--- a/src/Database/YeshQL/Util.hs
+++ b/src/Database/YeshQL/Util.hs
@@ -5,6 +5,7 @@
 module Database.YeshQL.Util
 where
 
+import Prelude hiding (fail)
 import Database.YeshQL.Parser
 import Language.Haskell.TH
 import Language.Haskell.TH.Quote
@@ -13,6 +14,7 @@
 #endif
 import Data.Char (toLower, toUpper, isAlpha, isAlphaNum, chr, ord)
 import System.FilePath (takeBaseName)
+import Control.Monad.Fail
 
 queryName :: String -> String -> Name
 queryName prefix = mkName . queryIdentifier prefix
diff --git a/yeshql-core.cabal b/yeshql-core.cabal
--- a/yeshql-core.cabal
+++ b/yeshql-core.cabal
@@ -1,5 +1,5 @@
 name: yeshql-core
-version: 4.1.1.2
+version: 4.2.0.0
 synopsis: YesQL-style SQL database abstraction (core)
 description: Use quasi-quotations or TemplateHaskell to write SQL in SQL, while
              adding type annotations to turn SQL into well-typed Haskell
@@ -28,6 +28,7 @@
     -- other-extensions:
     build-depends: base >=4.6 && <5.0
                  , containers >= 0.5 && < 1.0
+                 , fail >=4.9.0.0 && <4.10
                  , filepath
                  , parsec >= 3.0 && <4.0
                  , template-haskell
