 ;;;
 
 (defun ghc-refine ()
+  "Refine a hole using a user-specified function"
   (interactive)
   (let ((info (ghc-obtain-refine (read-string "Refine with: "))))
     (if (null info)

(ghc-defstruct sinfo beg-line beg-column end-line end-column info)

(defun ghc-case-split ()
  (interactive)
  (let ((info (ghc-obtain-case-split)))
    (if (null info)

;; Common code for case splitting and refinement

(defun ghc-perform-rewriting (info)
  "Replace code with new string obtained from ghc-mod"
  (let* ((current-line    (line-number-at-pos))
	 (begin-line      (ghc-sinfo-get-beg-line info))
	 (begin-line-diff (+ 1 (- begin-line current-line)))
