diff --git a/Changelog.md b/Changelog.md
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,3 +1,7 @@
+### 1.6.2.1
+
+- Revert to using C stubs with HLS via CPP macro *\_\_GHCIDE\_\_*.
+
 ### 1.6.2
 
 - Use *CApiFFI* to avoid interactive linking against C functions with HLS /
diff --git a/NgxExport/Log/CLog.hs b/NgxExport/Log/CLog.hs
--- a/NgxExport/Log/CLog.hs
+++ b/NgxExport/Log/CLog.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE CApiFFI #-}
+{-# LANGUAGE CPP, CApiFFI #-}
 
 module NgxExport.Log.CLog where
 
@@ -8,8 +8,15 @@
 
 type CLogType = Ptr () -> CUIntPtr -> CString -> CSize -> IO ()
 
+#if defined(__GHCIDE__)
+-- avoid interactive linking against C functions with HLS
+#define C_LOG_STUB(f) f :: CLogType; f _ _ _ _ = return ()
+C_LOG_STUB(c_log)
+C_LOG_STUB(c_log_r)
+#else
 foreign import capi
     "ngx_log_plugin_capi.h plugin_ngx_http_haskell_log" c_log :: CLogType
 foreign import capi
     "ngx_log_plugin_capi.h plugin_ngx_http_haskell_log_r" c_log_r :: CLogType
+#endif
 
diff --git a/ngx-export-log.cabal b/ngx-export-log.cabal
--- a/ngx-export-log.cabal
+++ b/ngx-export-log.cabal
@@ -1,5 +1,5 @@
 name:                  ngx-export-log
-version:               1.6.2
+version:               1.6.2.1
 synopsis:    Native Nginx logging from configuration files and Haskell handlers
 description: Native Nginx logging from configuration files and Haskell handlers.
         .
