                       'interrupted)
     (let* ((file-buffer (current-buffer))
            (temp-file (intero-localize-path (intero-temp-file-name)))
-           (mod-time (nth 5 (file-attributes temp-file))))
-      (unless (intero-check-reuse-last-results mod-time cont)
+           (hash (intero-check-calculate-hash)))
+      (unless (intero-check-reuse-last-results hash cont)
         (intero-async-call
          'backend
          (concat ":l " temp-file)
          (list :cont cont
                :file-buffer file-buffer
-               :mod-time mod-time
+               :hash hash
                :checker checker)
          (lambda (state string)
            (with-current-buffer (plist-get state :file-buffer)
-             (unless (intero-check-reuse-last-results (plist-get state :mod-time)
+             (unless (intero-check-reuse-last-results (plist-get state :hash)
                                                       (plist-get state :cont))
                (let* ((compile-ok (string-match "OK, modules loaded: \\(.*\\)\\.$" string))
                       (modules (match-string 1 string))

  (setq intero-check-last-mod-time nil
        intero-check-last-results nil)
  (flycheck-mode))

(defun intero-check (checker cont)
  "Run a check with CHECKER and pass the status onto CONT."

                 (let ((results (cl-remove-if (lambda (msg)
                                                (eq 'splice (flycheck-error-level msg)))
                                              msgs)))
                   (setq intero-check-last-hash (plist-get state :hash)
                         intero-check-last-results results)
                   (funcall (plist-get state :cont) 'finished results))
                 (when compile-ok
