diff --git a/Text/Parsers/Frisby.hs b/Text/Parsers/Frisby.hs
--- a/Text/Parsers/Frisby.hs
+++ b/Text/Parsers/Frisby.hs
@@ -179,6 +179,7 @@
 import qualified Control.Applicative (many)
 import qualified Data.IntSet as IntSet
 import Control.Monad.Fix
+import Control.Monad.Fail
 import Control.Monad.Identity
 import Data.Char(ord,chr)
 import Control.Monad.State
@@ -187,6 +188,7 @@
 import qualified Data.Semigroup as Semigroup
 import Data.Monoid hiding(Any,(<>))
 import qualified Data.Map as Map
+import qualified Control.Monad.Fail as Fail
 import Prelude hiding((<>))
 
 --inline usable part of Unsafe.Coerce until that module is commonly available
@@ -807,11 +809,11 @@
 -- | Create a new regular expression matching parser. it returns something in a
 -- possibly failing monad to indicate an error in the regular expression itself.
 
-newRegex :: Monad m => String -> m (PM s (P s String))
+newRegex :: Fail.MonadFail m => String -> m (PM s (P s String))
 newRegex s = case parse_regex s of
     Just r -> return (return $ regexToParser r)
     Nothing -> err
-   where err = fail $ "invalid regular expression: " ++ show s
+   where err = Fail.fail $ "invalid regular expression: " ++ show s
 
 
 -- | Show a representation of the parsed regex, mainly for debugging.
@@ -822,4 +824,8 @@
 
 -- | Make a new regex but abort on an error in the regex string itself.
 regex :: String -> PM s (P s String)
-regex s = runIdentity (newRegex s)
+regex s =
+  case parse_regex s of
+    Just r -> return $ regexToParser r
+    Nothing -> err
+   where err = error $ "invalid regular expression: " ++ show s
diff --git a/frisby.cabal b/frisby.cabal
--- a/frisby.cabal
+++ b/frisby.cabal
@@ -1,5 +1,5 @@
 name:                frisby
-version:             0.2.2
+version:             0.2.3
 cabal-version:       >=1.6
 license:             BSD3
 copyright:           John Meacham (2006)
@@ -7,7 +7,6 @@
 maintainer:          Ben Gamari <ben@smart-cactus.org>
 stability:           experimental
 homepage:            http://repetae.net/computer/frisby/
-homepage:            http://repetae.net/computer/frisby/
 package-url:         http://repetae.net/repos/frisby
 synopsis:            Linear time composable parser for PEG grammars
 description:         frisby is a parser library that can parse arbitrary PEG
@@ -24,13 +23,14 @@
                      routines to translate standard regex syntax into frisby parsers.
 extra-source-files:  Changelog.md
 category:            Text
-tested-with:         GHC == 7.6.*, GHC == 7.8.*, GHC == 7.10.*, GHC == 8.0.*, GHC == 8.2.*
+tested-with:         GHC == 7.6.*, GHC == 7.8.*, GHC == 7.10.*, GHC == 8.0.*, GHC == 8.2.*,
+                     GHC == 8.4.*, GHC == 8.6.*, GHC == 8.8.*
 license-file:        LICENSE
 build-type:          Simple
 
 library
   exposed-modules:     Text.Parsers.Frisby, Text.Parsers.Frisby.Char
-  build-depends:       base>=4 && <5, containers, mtl, array, semigroups
+  build-depends:       base>=4 && <5, fail, containers, mtl, array, semigroups
 
 source-repository head
   type:     git
