diff --git a/Changelog.md b/Changelog.md
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,3 +1,9 @@
+### 0.4.6.0
+
+- Added function *workerProcessIsExiting* to check quickly in an exception
+  handler whether a Haskell service has been interrupted because the worker
+  process is exiting.
+
 ### 0.4.5.0
 
 - Added function *ngxPid* to return the PID of the current worker process
diff --git a/NgxExport/Tools.hs b/NgxExport/Tools.hs
--- a/NgxExport/Tools.hs
+++ b/NgxExport/Tools.hs
@@ -22,6 +22,7 @@
                         terminateWorkerProcess
                        ,restartWorkerProcess
                        ,finalizeHTTPRequest
+                       ,workerProcessIsExiting
                        ,ngxRequestPtr
                        ,ngxNow
                        ,ngxPid
@@ -102,6 +103,14 @@
 finalizeHTTPRequest :: Int -> Maybe String -> IO ()
 finalizeHTTPRequest = (throwIO .) . FinalizeHTTPRequest
 
+-- | Checks that a generic exception is of type 'WorkerProcessIsExiting'.
+--
+-- This can be useful to check quickly in an exception handler whether a
+-- Haskell service has been interrupted because the worker process is exiting.
+workerProcessIsExiting :: SomeException -> Bool
+workerProcessIsExiting e =
+    isJust (fromException e :: Maybe WorkerProcessIsExiting)
+
 -- | Unmarshals the value of Nginx variable __/$_r_ptr/__ into a pointer to
 --   the Nginx request object.
 --
@@ -126,7 +135,7 @@
 ngxNow :: IO CTime
 ngxNow = ngxCachedTimePtr >>= peek >>= peek . castPtr
 
--- | Returns the /PID/ of the current worker process cached in Nginx.
+-- | Returns the /PID/ of the current worker process cached in Nginx core.
 ngxPid :: IO CPid
 ngxPid = ngxCachedPid
 
@@ -541,6 +550,14 @@
             if hasConf
                 then let (tName, isJSON) = first nameBase $ fromJust c
                      in (mkName $ "storage_" ++ tName ++ '_' : nameF
+                        -- FIXME: using base name of the type means that it is
+                        -- not possible to pass here qualified types from
+                        -- external modules. Using showName instead of nameBase
+                        -- won't help, as it adds static qualified names like
+                        -- GHC.Types.Int that can be unexpected in the context
+                        -- of the user's module scope, instead of adding the
+                        -- dynamic namespace (possibly not qualified) specified
+                        -- in the import clause of the user's module.
                         ,conT $ mkName tName
                         ,if isJSON
                              then [|readFromByteStringAsJSON|]
diff --git a/ngx-export-tools.cabal b/ngx-export-tools.cabal
--- a/ngx-export-tools.cabal
+++ b/ngx-export-tools.cabal
@@ -1,5 +1,5 @@
 name:                       ngx-export-tools
-version:                    0.4.5.0
+version:                    0.4.6.0
 synopsis:                   Extra tools for Nginx haskell module
 description:                Extra tools for
         <http://github.com/lyokha/nginx-haskell-module Nginx haskell module>.
