 (define-key idris-mode-map (kbd "C-c C-t") 'idris-type-at-point)
 (define-key idris-mode-map (kbd "C-c C-d") 'idris-add-clause)
 
+(add-hook 'idris-mode-hook
+          (lambda () (add-hook 'after-save-hook 'idris-load t)))
 
 (provide 'auto-idris)

  (idris-load)
  (let ((what (idris-thing-at-point)))
   (call-idris-client (concat ":am! " (number-to-string (cdr what)) " " (car what))))
  (revert-buffer t t))

;;;; Bindings to imitate Agda somewhat
(define-key idris-mode-map (kbd "C-c C-c") 'idris-case-split)

  (let ((hints (if hints (split-string hints "[^a-zA-Z0-9']") " "))
        (what (idris-thing-at-point)))
    (call-idris-client (format ":ps! %s %s %s" (number-to-string (cdr what)) (car what) hints)))
  (revert-buffer t t)
  (idris-load))

(defun idris-add-missing ()
  "Add missing cases"
