diff --git a/ginger.cabal b/ginger.cabal
--- a/ginger.cabal
+++ b/ginger.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                ginger
-version:             0.10.4.0
+version:             0.10.5.0
 synopsis:            An implementation of the Jinja2 template language in Haskell
 description:         Ginger is Jinja, minus the most blatant pythonisms. Wants
                      to be feature complete, but isn't quite there yet.
@@ -42,7 +42,7 @@
   build-depends: base >=4.8 && <5
                , aeson >=1.4.2.0 && <2.1
                , aeson-pretty >=0.8.7 && <0.9
-               , bytestring >=0.10.8.2 && <0.11
+               , bytestring >=0.10.8.2 && <0.12
                , containers >=0.6.4 && <0.7
                , data-default >= 0.5
                , filepath >= 1.3
@@ -52,7 +52,7 @@
                , regex-tdfa >=1.2.3 && <=1.5
                , safe >= 0.3
                , scientific >= 0.3
-               , text >=1.2.3.1 && <1.3
+               , text >=1.2.3.1 && <2.1
                , time >= 0.1.6.0
                , transformers >= 0.3
                , unordered-containers >= 0.2.5
@@ -73,12 +73,12 @@
     build-depends: base >= 4.8 && <5
                  , ginger
                  , aeson >=1.4.2.0 && <2.1
-                 , bytestring >=0.10.8.2 && <0.11
+                 , bytestring >=0.10.8.2 && <0.12
                  , data-default >= 0.5
-                 , optparse-applicative >=0.14.3.0 && <0.17
+                 , optparse-applicative >=0.14.3.0 && <0.18
                  , process >=1.6.5.0 && <1.7
-                 , text >=1.2.3.1 && <1.3
-                 , transformers >=0.5.6.2 && <0.6
+                 , text >=1.2.3.1 && <2.1
+                 , transformers >=0.5.6.2 && <0.7
                  , unordered-containers >= 0.2.5
                  , utf8-string >=1.0.1.1 && <1.1
                  , yaml >=0.11.0.0 && <0.12
@@ -93,14 +93,14 @@
     build-depends: base >=4.8 && <5
                  , ginger
                  , aeson >=1.4.2.0 && <2.1
-                 , bytestring >=0.10.8.2 && <0.11
+                 , bytestring >=0.10.8.2 && <0.12
                  , data-default >=0.5
-                 , mtl >=2.2.2 && <2.3
+                 , mtl >=2.2.2 && <2.4
                  , tasty >=1.2 && <1.5
                  , tasty-hunit >=0.10.0.1 && <0.11
                  , tasty-quickcheck >=0.10 && <0.11
-                 , text >=1.2.3.1 && <1.3
+                 , text >=1.2.3.1 && <2.1
                  , time >= 0.1.6.0
-                 , transformers >=0.5.6.2 && <0.6
+                 , transformers >=0.5.6.2 && <0.7
                  , unordered-containers >= 0.2.5
                  , utf8-string >=1.0.1.1 && <1.1
diff --git a/src/Text/Ginger/Run.hs b/src/Text/Ginger/Run.hs
--- a/src/Text/Ginger/Run.hs
+++ b/src/Text/Ginger/Run.hs
@@ -95,7 +95,7 @@
 import Text.Printf
 import Text.PrintfA
 import Text.Ginger.Parse (parseGinger, ParserError)
-import Control.Monad.Except (runExceptT, throwError, catchError)
+import Control.Monad.Trans.Except (runExceptT, catchE)
 
 import Data.Text (Text)
 import Data.String (fromString)
@@ -118,6 +118,7 @@
 import Network.HTTP.Types (urlEncode)
 import Debug.Trace (trace)
 import Data.List (lookup, zipWith, unzip)
+import Data.Monoid (Monoid (..), (<>))
 import Data.Aeson as JSON
 
 defaultScope :: forall m h p
@@ -484,7 +485,7 @@
     withTemplate tpl $ runTemplate tpl
 
 runStatement' (TryCatchS _ tryS catchesS finallyS) = do
-    result <- (runStatement tryS) `catchError` handle catchesS
+    result <- (runStatement tryS) `catchE` handle catchesS
     runStatement finallyS
     return result
     where
diff --git a/src/Text/Ginger/Run/Builtins.hs b/src/Text/Ginger/Run/Builtins.hs
--- a/src/Text/Ginger/Run/Builtins.hs
+++ b/src/Text/Ginger/Run/Builtins.hs
@@ -1,5 +1,7 @@
+{-#LANGUAGE DerivingStrategies #-}
 {-#LANGUAGE FlexibleContexts #-}
 {-#LANGUAGE FlexibleInstances #-}
+{-#LANGUAGE GeneralizedNewtypeDeriving #-}
 {-#LANGUAGE OverloadedStrings #-}
 {-#LANGUAGE TupleSections #-}
 {-#LANGUAGE TypeSynonymInstances #-}
@@ -38,7 +40,6 @@
                , either
                )
 import qualified Prelude
-import Control.Monad.Error (runErrorT)
 import Data.Maybe (fromMaybe, isJust, isNothing)
 import qualified Data.List as List
 import Text.Ginger.AST
@@ -56,7 +57,6 @@
 import qualified Data.ByteString.UTF8 as UTF8
 import qualified Data.ByteString.Lazy as LBS
 import Control.Monad
-import Control.Monad.Identity
 import Control.Monad.Writer
 import Control.Monad.Reader
 import Control.Monad.State
@@ -71,6 +71,7 @@
 import Network.HTTP.Types (urlEncode)
 import Debug.Trace (trace)
 import Data.List (lookup, zipWith, unzip, foldl')
+import Data.Monoid (Monoid (..), (<>))
 import Data.Time ( defaultTimeLocale
                  , formatTime
                  , LocalTime (..)
@@ -852,7 +853,7 @@
         go [r, h, Just def]
       [Just reG, Just haystackG, Just optsG] -> do
         opts <- parseCompOpts optsG
-        let reM = runIdentity . runErrorT $
+        let reM = runFailToEither $
                       RE.makeRegexOptsM opts RE.defaultExecOpt (Text.unpack . asText $ reG)
             haystack = Text.unpack . asText $ haystackG
         case reM of
@@ -878,5 +879,17 @@
     )
     RE.blankCompOpt
     str
+
+-- | This type provides an easy way to use 'RE.makeRegexOptsM' without having
+-- to add a new dependency.
+newtype FailToEither a
+  = FailToEither
+      { runFailToEither :: Either String a
+      }
+  deriving newtype (Applicative, Functor, Monad)
+
+instance MonadFail FailToEither where
+  fail = FailToEither . Left
+  {-# INLINE fail #-}
 
 -- vim: sw=4 ts=4 expandtab
diff --git a/src/Text/Ginger/Run/Type.hs b/src/Text/Ginger/Run/Type.hs
--- a/src/Text/Ginger/Run/Type.hs
+++ b/src/Text/Ginger/Run/Type.hs
@@ -80,7 +80,7 @@
 import Text.Printf
 import Text.PrintfA
 import Data.Scientific (formatScientific)
-import Control.Monad.Except (ExceptT (..))
+import Control.Monad.Trans.Except (ExceptT (..), runExceptT)
 import Data.Default (Default (..), def)
 
 import Data.Char (isSpace)
@@ -104,6 +104,7 @@
 import Network.HTTP.Types (urlEncode)
 import Debug.Trace (trace)
 import Data.Maybe (isNothing)
+import Data.Monoid (Monoid (..), (<>))
 import Data.List (lookup, zipWith, unzip)
 
 -- | Execution context. Determines how to look up variables from the
