 	(ghc-check-highlight-original-buffer file buf infos)))
      (t
       (with-current-buffer ghc-process-original-buffer
-	(remove-overlays (point-min) (point-max) 'ghc-check t))))))
+	(remove-overlays (point-min) (point-max) 'ghc-check t))))
+    (with-current-buffer ghc-process-original-buffer
+      (let ((len (length infos)))
+	(if (= len 0)
+	    (setq mode-line-process "")
+	  (let* ((errs (ghc-filter 'ghc-hilit-info-get-err infos))
+		 (elen (length errs))
+		 (wlen (- len elen)))
+	    (setq mode-line-process (format " %d:%d" elen wlen))))))))
 
 (defun ghc-check-highlight-original-buffer (ofile buf infos)
   (with-current-buffer buf


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(ghc-defstruct hilit-info file line col msg)

(defun ghc-check-send ()
  (concat "check " ghc-process-original-file "\n"))

  (let ((regex "^\\([^\n\0]*\\):\\([0-9]+\\):\\([0-9]+\\): *\\(.+\\)")
	info infos)
    (while (re-search-forward regex nil t)
      (let* ((file (match-string 1))
	     (line (string-to-number (match-string 2)))
	     (col  (string-to-number (match-string 3)))
	     (msg  (match-string 4))
	     (err  (not (string-match "^Warning" msg)))
	     (info (ghc-make-hilit-info
		    :file file
		    :line line
		    :col  col
		    :msg  msg
		    :err  err)))
	(setq infos (cons info infos))))
    (setq infos (nreverse infos))
    (cond
     (infos
