Author: Joachim Breitner <nomeata@debian.org>

--- a/Control/Monad/Logger.hs
+++ b/Control/Monad/Logger.hs
@@ -93,6 +93,8 @@
 
 #if WITH_TEMPLATE_HASKELL
 import Language.Haskell.TH.Syntax (Lift (lift), Q, Exp, Loc (..), qLocation)
+#else
+import Language.Haskell.TH.Syntax (Loc (..))
 #endif
 
 import Data.Monoid (Monoid)
@@ -185,16 +187,6 @@
     lift LevelError = [|LevelError|]
     lift (LevelOther x) = [|LevelOther $ pack $(lift $ unpack x)|]
 
-#else
-
-data Loc
-  = Loc { loc_filename :: String
-    , loc_package  :: String
-    , loc_module   :: String
-    , loc_start    :: CharPos
-    , loc_end      :: CharPos }
-type CharPos = (Int, Int)
-
 #endif
 
 -- | A @Monad@ which has the ability to log messages in some manner.
--- a/monad-logger.cabal
+++ b/monad-logger.cabal
@@ -44,13 +44,11 @@
                      , bytestring
                      , blaze-builder
                      , exceptions
+                     , template-haskell
 
   if impl(ghc >= 8.0.1)
      cpp-options: -DWITH_CALLSTACK
      exposed-modules:  Control.Monad.Logger.CallStack
 
   if flag(template_haskell)
-     build-depends:     template-haskell
-
-  if flag(template_haskell)
      cpp-options: -DWITH_TEMPLATE_HASKELL
