diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## Modern URI 0.1.2.1
+
+* Allow Megaparsec 6.4.0.
+
 ## Modern URI 0.1.2.0
 
 * Fixed handling of `+` in query strings. Now `+` is parsed as space and
diff --git a/Text/URI/Parser/ByteString.hs b/Text/URI/Parser/ByteString.hs
--- a/Text/URI/Parser/ByteString.hs
+++ b/Text/URI/Parser/ByteString.hs
@@ -9,17 +9,17 @@
 --
 -- URI parser for string 'ByteString', an internal module.
 
-{-# LANGUAGE DataKinds          #-}
-{-# LANGUAGE FlexibleContexts   #-}
-{-# LANGUAGE OverloadedStrings  #-}
-{-# LANGUAGE RankNTypes         #-}
-{-# LANGUAGE RecordWildCards    #-}
+{-# LANGUAGE CPP               #-}
+{-# LANGUAGE DataKinds         #-}
+{-# LANGUAGE FlexibleContexts  #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE RankNTypes        #-}
+{-# LANGUAGE RecordWildCards   #-}
 
 module Text.URI.Parser.ByteString
   ( parserBs )
 where
 
-import Control.Applicative
 import Control.Monad
 import Control.Monad.Catch (MonadThrow (..))
 import Data.ByteString (ByteString)
@@ -37,6 +37,10 @@
 import qualified Data.Set                   as E
 import qualified Data.Text.Encoding         as TE
 import qualified Text.Megaparsec.Byte.Lexer as L
+
+#if !MIN_VERSION_megaparsec(6,4,0)
+import Control.Applicative (empty)
+#endif
 
 -- | This parser can be used to parse 'URI' from strict 'ByteString'.
 -- Remember to use a concrete non-polymorphic parser type for efficiency.
diff --git a/Text/URI/Parser/Text.hs b/Text/URI/Parser/Text.hs
--- a/Text/URI/Parser/Text.hs
+++ b/Text/URI/Parser/Text.hs
@@ -9,6 +9,7 @@
 --
 -- URI parser for strict 'Text', an internal module.
 
+{-# LANGUAGE CPP               #-}
 {-# LANGUAGE DataKinds         #-}
 {-# LANGUAGE FlexibleContexts  #-}
 {-# LANGUAGE OverloadedStrings #-}
@@ -20,7 +21,6 @@
   , parser )
 where
 
-import Control.Applicative
 import Control.Monad
 import Control.Monad.Catch (MonadThrow (..))
 import Data.Maybe (isJust, catMaybes)
@@ -34,6 +34,10 @@
 import qualified Data.List.NonEmpty         as NE
 import qualified Data.Text.Encoding         as TE
 import qualified Text.Megaparsec.Char.Lexer as L
+
+#if !MIN_VERSION_megaparsec(6,4,0)
+import Control.Applicative (empty)
+#endif
 
 -- | Construct a 'URI' from 'Text'. The input you pass to 'mkURI' must be a
 -- valid URI as per RFC 3986, that is, its components should be
diff --git a/Text/URI/QQ.hs b/Text/URI/QQ.hs
--- a/Text/URI/QQ.hs
+++ b/Text/URI/QQ.hs
@@ -106,5 +106,5 @@
 
 -- | Lift strict 'T.Text' to @'Q' 'Exp'@.
 
-liftText :: T.Text -> Q Exp
+liftText :: Text -> Q Exp
 liftText txt = AppE (VarE 'T.pack) <$> lift (T.unpack txt)
diff --git a/modern-uri.cabal b/modern-uri.cabal
--- a/modern-uri.cabal
+++ b/modern-uri.cabal
@@ -1,5 +1,5 @@
 name:                 modern-uri
-version:              0.1.2.0
+version:              0.1.2.1
 cabal-version:        >= 1.18
 tested-with:          GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
 license:              BSD3
