diff --git a/elisp/shm-insert-del.el b/elisp/shm-insert-del.el
--- a/elisp/shm-insert-del.el
+++ b/elisp/shm-insert-del.el
@@ -481,10 +481,11 @@
     (shm-insert-string open))
    (t
     (shm/reparse)
-    (let ((current (shm-actual-node)))
+    (let ((current (shm-actual-node))
+          (looking-back-regexp "\\(\\(^\\|\\W\\)'\\|[ ,[({\\!]\\)"))
       (cond
        ((shm-find-overlay 'shm-quarantine)
-        (if (not (or (looking-back "[ ,[({\\!]")
+        (if (not (or (looking-back looking-back-regexp)
                      (and (looking-back "\\$")
                           (string= "(" open))
                      (bolp)))
@@ -498,7 +499,7 @@
             (shm-insert-string " "))
           (goto-char point)))
        (t
-        (if (not (or (looking-back "[ ,[({!\\]")
+        (if (not (or (looking-back looking-back-regexp)
                      (bolp)))
             (progn (shm-insert-string " ") 1)
           0)
diff --git a/elisp/shm-tests.el b/elisp/shm-tests.el
--- a/elisp/shm-tests.el
+++ b/elisp/shm-tests.el
@@ -64,6 +64,17 @@
 
 (defvar shm-tests
   (list
+(list :name "inserting after '"
+      :start-buffer-content "x = [foo'
+    ,()]
+"
+      :start-cursor 6
+      :finish-cursor 22
+      :current-node-overlay '(19 24)
+      :end-buffer-content "x = [foo' []
+    ,('[])]
+"
+      :kbd "[,('[")
    (list :name "don't re-indent dependent rhs"
          :start-buffer-content "foo bar baz =
      bar + baz
@@ -444,14 +455,14 @@
 "
          :kbd "\341\362\341\362")
    (list :name "splice"
-      :start-buffer-content "main = foo (bar)
+         :start-buffer-content "main = foo (bar)
 "
-      :start-cursor 13
-      :finish-cursor 12
-      :current-node-overlay '(12 15)
-      :end-buffer-content "main = foo bar
+         :start-cursor 13
+         :finish-cursor 12
+         :current-node-overlay '(12 15)
+         :end-buffer-content "main = foo bar
 "
-      :kbd "\363")
+         :kbd "\363")
    (list :name "kill-line"
          :start-buffer-content "main = do foo
           bar
diff --git a/src/Main.hs b/src/Main.hs
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -166,8 +166,8 @@
                                (srcSpanStartColumn start)
                                (srcSpanEndLine end)
                                (srcSpanEndColumn end))
-             |Just (IHead (SrcSpanInfo start _) _ _) <- [listToMaybe ds]
-             ,Just (IHead (SrcSpanInfo end _) _ _) <- [listToMaybe (reverse ds)]]
+             |Just (IRule _ _ _ (IHCon (SrcSpanInfo start _) _)) <- [listToMaybe ds]
+             ,Just (IRule _ _ _ (IHCon (SrcSpanInfo end _) _)) <- [listToMaybe (reverse ds)]]
            _ -> []
 
 -- | Generate a span from a HSE SrcSpan.
diff --git a/structured-haskell-mode.cabal b/structured-haskell-mode.cabal
--- a/structured-haskell-mode.cabal
+++ b/structured-haskell-mode.cabal
@@ -1,5 +1,5 @@
 name:                structured-haskell-mode
-version:             1.0.15
+version:             1.0.16
 synopsis:            Structured editing Emacs mode for Haskell
 description:         Structured editing Emacs mode for Haskell.
 homepage:            https://github.com/chrisdone/structured-haskell-mode
@@ -42,6 +42,6 @@
   ghc-options:       -O2 -Wall
   hs-source-dirs:    src
   build-depends:     base >= 4 && < 5
-                   , haskell-src-exts == 1.15.*
+                   , haskell-src-exts == 1.16.*
                    , text
-                   , descriptive >= 0.7 && < 0.9
+                   , descriptive >= 0.7 && < 0.8
