       (newline 1)
       (delete-blank-lines))))
 
-(defun th-resolve-hole-prompt (str)
+(defun th-resolve-hole-new-function-here ()
+  (interactive)
+  (th-resolve-hole-new-function (funcall th-get-type-hole-info-function)))
+
+(defun th-resolve-hole-prompt-here (str)
   (interactive "sEnter replacement for hole: ")
-  (th--replace-type-hole-simple str))
-
-(defun th-resolve-hole-new-function-here (arg)
-  (interactive "p")
-  (let ((add-arg-holes (>= arg 4))
-        (add-parens (>= arg 16)))
-    (th-resolve-hole-new-function
-     (funcall th-get-type-hole-info-function) add-parens add-arg-holes)))
+  (th--replace-type-hole-dwim str (th--get-hole-type
+                                   (funcall th-get-type-hole-info-function))))
 
 (defun th-relevant-hole-bindings (str)
   (with-temp-buffer


(defun th-hoogle-search (query)
  (with-temp-buffer
    (call-process "hoogle" nil t nil "search" "-n 30" query)
    (goto-char (point-min))
    (unless (looking-at "^No results found")
      (-filter (lambda (s)

    (define-key map (kbd "C-c C-k C-b") 'th-resolve-hole-relevant-bindings-here)
    (define-key map (kbd "C-c C-k C-f") 'th-resolve-hole-new-function-here)
    (define-key map (kbd "C-c C-k C-t") 'th-toggle-type-hole-undefined-line)
    (define-key map (kbd "C-c C-k TAB") 'th-resolve-hole-prompt-here)
    map))

(defun th--get-type-hole-info-flycheck ()
