diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,9 @@
 # ChangeLog for githash
 
+## 0.1.6.1
+
+* [Support template-haskell 2.17](https://github.com/snoyberg/githash/pull/22)
+
 ## 0.1.6.0
 
 * Always include patchlevel and hash in git-describe output
diff --git a/githash.cabal b/githash.cabal
--- a/githash.cabal
+++ b/githash.cabal
@@ -5,7 +5,7 @@
 -- see: https://github.com/sol/hpack
 
 name:           githash
-version:        0.1.6.0
+version:        0.1.6.1
 synopsis:       Compile git revision info into Haskell projects
 description:    Please see the README and documentation at <https://www.stackage.org/package/githash>
 category:       Development
@@ -38,6 +38,7 @@
     , filepath
     , process
     , template-haskell
+    , th-compat
   default-language: Haskell2010
 
 test-suite githash-spec
@@ -61,5 +62,6 @@
     , process
     , template-haskell
     , temporary
+    , th-compat
     , unliftio
   default-language: Haskell2010
diff --git a/src/GitHash.hs b/src/GitHash.hs
--- a/src/GitHash.hs
+++ b/src/GitHash.hs
@@ -65,6 +65,7 @@
 import Data.Typeable (Typeable)
 import Language.Haskell.TH
 import Language.Haskell.TH.Syntax
+import Language.Haskell.TH.Syntax.Compat
 import System.Directory
 import System.Exit
 import System.FilePath
@@ -256,8 +257,8 @@
 -- directory. Compilation fails if no info is available.
 --
 -- @since 0.1.0.0
-tGitInfo :: FilePath -> Q (TExp GitInfo)
-tGitInfo fp = unsafeTExpCoerce $ do
+tGitInfo :: FilePath -> SpliceQ GitInfo
+tGitInfo fp = unsafeSpliceCoerce $ do
   gi <- runIO $
     getGitRoot fp >>=
     either throwIO return >>=
@@ -270,8 +271,8 @@
 -- directory.
 --
 -- @since 0.1.2.0
-tGitInfoTry :: FilePath -> Q (TExp (Either String GitInfo))
-tGitInfoTry fp = unsafeTExpCoerce $ do
+tGitInfoTry :: FilePath -> SpliceQ (Either String GitInfo)
+tGitInfoTry fp = unsafeSpliceCoerce $ do
   egi <- runIO $ do
     eroot <- getGitRoot fp
     case eroot of
@@ -290,12 +291,12 @@
 -- working directory.
 --
 -- @since 0.1.0.0
-tGitInfoCwd :: Q (TExp GitInfo)
+tGitInfoCwd :: SpliceQ GitInfo
 tGitInfoCwd = tGitInfo "."
 
 -- | Try to load up the 'GitInfo' value at compile time for the current
 -- working directory.
 --
 -- @since 0.1.2.0
-tGitInfoCwdTry :: Q (TExp (Either String GitInfo))
+tGitInfoCwdTry :: SpliceQ (Either String GitInfo)
 tGitInfoCwdTry = tGitInfoTry "."
