diff --git a/hslogger-template.cabal b/hslogger-template.cabal
--- a/hslogger-template.cabal
+++ b/hslogger-template.cabal
@@ -1,5 +1,5 @@
 name:        hslogger-template
-version:     2.0.3
+version:     2.0.4
 category:    Interfaces
 synopsis:    Automatic generation of hslogger functions
 description: Library for generating hslogger functions using Template Haskell.
diff --git a/src/System/Log/Logger/TH.hs b/src/System/Log/Logger/TH.hs
--- a/src/System/Log/Logger/TH.hs
+++ b/src/System/Log/Logger/TH.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TemplateHaskell, ExplicitForAll #-}
 
 -- | This module provides functions that generate hslogger functions using
 -- Template Haskell.
@@ -89,7 +89,7 @@
 
 deriveLogger :: String -> String -> Maybe String -> HSL.Priority -> TH.Q [TH.Dec]
 deriveLogger qualifier moduleName mprefix priority = do
-    sig  <- TH.sigD thF [t| MonadIO m => String -> m () |]
+    sig  <- TH.sigD thF [t| forall m. MonadIO m => String -> m () |]
     body <- TH.funD thF
               [ TH.clause
                   [TH.varP thS]
