diff --git a/hls-tactics-plugin.cabal b/hls-tactics-plugin.cabal
--- a/hls-tactics-plugin.cabal
+++ b/hls-tactics-plugin.cabal
@@ -1,7 +1,7 @@
 cabal-version:      2.4
 category:           Development
 name:               hls-tactics-plugin
-version:            1.6.1.0
+version:            1.6.2.0
 synopsis:           Wingman plugin for Haskell Language Server
 description:
   Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>
@@ -82,9 +82,9 @@
     , ghc-boot-th
     , ghc-exactprint
     , ghc-source-gen        ^>=0.4.1
-    , ghcide                ^>=1.6
+    , ghcide                ^>=1.7
     , hls-graph
-    , hls-plugin-api        ^>=1.3
+    , hls-plugin-api        ^>=1.4
     , hyphenation
     , lens
     , lsp
@@ -160,7 +160,7 @@
     , ghcide
     , hls-plugin-api
     , hls-tactics-plugin
-    , hls-test-utils      ^>=1.2
+    , hls-test-utils      ^>=1.3
     , hspec
     , hspec-expectations
     , lens
diff --git a/src/Ide/Plugin/Tactic.hs b/src/Ide/Plugin/Tactic.hs
--- a/src/Ide/Plugin/Tactic.hs
+++ b/src/Ide/Plugin/Tactic.hs
@@ -1,5 +1,5 @@
 -- | A plugin that uses tactics to synthesize code
-module Ide.Plugin.Tactic (descriptor) where
+module Ide.Plugin.Tactic (descriptor, Log(..)) where
 
 import Wingman.Plugin
 
diff --git a/src/Wingman/Debug.hs b/src/Wingman/Debug.hs
--- a/src/Wingman/Debug.hs
+++ b/src/Wingman/Debug.hs
@@ -18,8 +18,10 @@
 import           Control.DeepSeq
 import           Control.Exception
 import           Data.Either (fromRight)
+import qualified Data.Text as T
 import qualified Debug.Trace
-import           Development.IDE.GHC.Compat (PlainGhcException, Outputable(..), SDoc, showSDocUnsafe)
+import           Development.IDE.GHC.Compat (PlainGhcException, Outputable(..), SDoc)
+import           Development.IDE.GHC.Util (printOutputable)
 import           System.IO.Unsafe  (unsafePerformIO)
 
 ------------------------------------------------------------------------------
@@ -30,7 +32,7 @@
 
 unsafeRender' :: SDoc -> String
 unsafeRender' sdoc = unsafePerformIO $ do
-  let z = showSDocUnsafe sdoc
+  let z = T.unpack $ printOutputable sdoc
   -- We might not have unsafeGlobalDynFlags (like during testing), in which
   -- case GHC panics. Instead of crashing, let's just fail to print.
   !res <- try @PlainGhcException $ evaluate $ deepseq z z
diff --git a/src/Wingman/Judgements.hs b/src/Wingman/Judgements.hs
--- a/src/Wingman/Judgements.hs
+++ b/src/Wingman/Judgements.hs
@@ -34,7 +34,8 @@
   where
     go (occName -> occ, t)
       | Just ty <- t
-      , isAlpha . head . occNameString $ occ = Just $ HyInfo occ UserPrv $ CType ty
+      , (h:_) <- occNameString occ
+      , isAlpha h = Just $ HyInfo occ UserPrv $ CType ty
       | otherwise = Nothing
 
 
diff --git a/src/Wingman/LanguageServer.hs b/src/Wingman/LanguageServer.hs
--- a/src/Wingman/LanguageServer.hs
+++ b/src/Wingman/LanguageServer.hs
@@ -36,7 +36,7 @@
 import           Development.IDE.GHC.Compat hiding (empty)
 import qualified Development.IDE.GHC.Compat.Util as FastString
 import           Development.IDE.GHC.Error (realSrcSpanToRange)
-import           Development.IDE.GHC.ExactPrint
+import           Development.IDE.GHC.ExactPrint hiding (LogShake, Log)
 import           Development.IDE.Graph (Action, RuleResult, Rules, action)
 import           Development.IDE.Graph.Classes (Hashable, NFData)
 import           Development.IDE.Spans.LocalBindings (Bindings, getDefiningBindings)
@@ -63,8 +63,18 @@
 import           Wingman.Range
 import           Wingman.StaticPlugin (pattern WingmanMetaprogram, pattern MetaprogramSyntax)
 import           Wingman.Types
+import Development.IDE.Types.Logger (Recorder, cmapWithPrio, WithPriority, Pretty (pretty))
+import qualified Development.IDE.Core.Shake as Shake
 
 
+newtype Log 
+  = LogShake Shake.Log
+  deriving Show
+
+instance Pretty Log where
+  pretty = \case 
+    LogShake shakeLog -> pretty shakeLog
+
 tacticDesc :: T.Text -> T.Text
 tacticDesc name = "fill the hole using the " <> name <> " tactic"
 
@@ -550,9 +560,9 @@
 
 type instance RuleResult GetMetaprograms = [(Tracked 'Current RealSrcSpan, T.Text)]
 
-wingmanRules :: PluginId -> Rules ()
-wingmanRules plId = do
-  define $ \WriteDiagnostics nfp ->
+wingmanRules :: Recorder (WithPriority Log) -> PluginId -> Rules ()
+wingmanRules recorder plId = do
+  define (cmapWithPrio LogShake recorder) $ \WriteDiagnostics nfp ->
     usePropertyAction #hole_severity plId properties >>= \case
       Nothing -> pure (mempty, Just ())
       Just severity ->
@@ -585,7 +595,7 @@
               , Just ()
               )
 
-  defineNoDiagnostics $ \GetMetaprograms nfp -> do
+  defineNoDiagnostics (cmapWithPrio LogShake recorder) $ \GetMetaprograms nfp -> do
     TrackedStale tcg tcg_map <- fmap tmrTypechecked <$> useWithStale_ TypeCheck nfp
     let scrutinees = traverse (metaprogramQ . tcg_binds) tcg
     return $ Just $ flip mapMaybe scrutinees $ \aged@(unTrack -> (ss, program)) -> do
diff --git a/src/Wingman/Naming.hs b/src/Wingman/Naming.hs
--- a/src/Wingman/Naming.hs
+++ b/src/Wingman/Naming.hs
@@ -220,7 +220,29 @@
   . foldMap (\n -> bool (pure n) mempty $ check n)
   $ tn <> fmap (<> "'") tn
   where
-    check n = S.member (mkVarOcc n) in_scope
+    check n = S.member (mkVarOcc n) $ illegalNames <> in_scope
+
+
+illegalNames :: Set OccName
+illegalNames = S.fromList $ fmap mkVarOcc
+  [ "case"
+  , "of"
+  , "class"
+  , "data"
+  , "do"
+  , "type"
+  , "if"
+  , "then"
+  , "else"
+  , "let"
+  , "in"
+  , "mdo"
+  , "newtype"
+  , "proc"
+  , "rec"
+  , "where"
+  ]
+
 
 
 ------------------------------------------------------------------------------
diff --git a/src/Wingman/Plugin.hs b/src/Wingman/Plugin.hs
--- a/src/Wingman/Plugin.hs
+++ b/src/Wingman/Plugin.hs
@@ -9,20 +9,29 @@
 import           Wingman.AbstractLSP
 import           Wingman.AbstractLSP.TacticActions (makeTacticInteraction)
 import           Wingman.EmptyCase
-import           Wingman.LanguageServer
+import           Wingman.LanguageServer hiding (Log)
+import qualified Wingman.LanguageServer as WingmanLanguageServer
 import           Wingman.LanguageServer.Metaprogram (hoverProvider)
 import           Wingman.StaticPlugin
+import Development.IDE.Types.Logger (Recorder, cmapWithPrio, WithPriority, Pretty (pretty))
 
+newtype Log
+  = LogWingmanLanguageServer WingmanLanguageServer.Log 
+  deriving Show
 
-descriptor :: PluginId -> PluginDescriptor IdeState
-descriptor plId
+instance Pretty Log where
+  pretty = \case
+    LogWingmanLanguageServer log -> pretty log
+
+descriptor :: Recorder (WithPriority Log) -> PluginId -> PluginDescriptor IdeState
+descriptor recorder plId
   = installInteractions
       ( emptyCaseInteraction
       : fmap makeTacticInteraction [minBound .. maxBound]
       )
   $ (defaultPluginDescriptor plId)
       { pluginHandlers = mkPluginHandler STextDocumentHover hoverProvider
-      , pluginRules = wingmanRules plId
+      , pluginRules = wingmanRules (cmapWithPrio LogWingmanLanguageServer recorder) plId
       , pluginConfigDescriptor =
           defaultConfigDescriptor
             { configCustomConfig = mkCustomConfig properties
diff --git a/test/CodeAction/DestructSpec.hs b/test/CodeAction/DestructSpec.hs
--- a/test/CodeAction/DestructSpec.hs
+++ b/test/CodeAction/DestructSpec.hs
@@ -20,6 +20,7 @@
     destructTest "b"     7 10 "DestructTyFam"
     destructTest "b"     7 10 "DestructDataFam"
     destructTest "b"    17 10 "DestructTyToDataFam"
+    destructTest "t"     6 10 "DestructInt"
 
   describe "layout" $ do
     destructTest "b"  4  3 "LayoutBind"
diff --git a/test/Utils.hs b/test/Utils.hs
--- a/test/Utils.hs
+++ b/test/Utils.hs
@@ -35,7 +35,7 @@
 
 
 plugin :: PluginDescriptor IdeState
-plugin = Tactic.descriptor "tactics"
+plugin = Tactic.descriptor mempty "tactics"
 
 ------------------------------------------------------------------------------
 -- | Get a range at the given line and column corresponding to having nothing
diff --git a/test/golden/DestructInt.expected.hs b/test/golden/DestructInt.expected.hs
new file mode 100644
--- /dev/null
+++ b/test/golden/DestructInt.expected.hs
@@ -0,0 +1,7 @@
+import Data.Int
+
+data Test = Test Int32
+
+test :: Test -> Int32
+test (Test in') = _w0
+
diff --git a/test/golden/DestructInt.hs b/test/golden/DestructInt.hs
new file mode 100644
--- /dev/null
+++ b/test/golden/DestructInt.hs
@@ -0,0 +1,7 @@
+import Data.Int
+
+data Test = Test Int32
+
+test :: Test -> Int32
+test t = _
+
