                       (intero-make-temp-file
                        "intero" nil
                        (concat "-TEMP." (if (buffer-file-name)
-                                       (file-name-extension (buffer-file-name))
-                                     "hs")))))
+                                            (file-name-extension (buffer-file-name))
+                                          "hs")))))
                (puthash intero-temp-file-name
                         (current-buffer)
                         intero-temp-file-buffer-mapping)

     (list :buffer (current-buffer) :cont cont)
     (lambda (state reply)
       (if (or (string-match "^Couldn't guess" reply)
                   (string-match "^Unable to " reply)
                   (intero-parse-error reply))
           (funcall (plist-get state :cont) (list))
         (with-current-buffer (plist-get state :buffer)
           (let ((candidates

     for msg in msgs
     do (let ((text (flycheck-error-message msg))
              (note nil))
          ;; Messages of this format:
          ;;
          ;;     • Constructor ‘Assert’ does not have the required strict field(s): assertName,
          ;; assertDoc, assertExpression,
          ;; assertSection
          (let ((start 0))
            (while (or
                    (string-match "does not have the required strict field.*?:[\n\t\r ]" text start)
                    (string-match "Fields of .*? not initialised:[\n\t\r ]" text start))
              (let* ((match-end (match-end 0))
                     (fields
                      (let ((reached-end nil))
                        (mapcar
                         (lambda (field)
                           (with-temp-buffer
                             (insert field)
                             (goto-char (point-min))
                             (intero-ident-at-point)))
                         (cl-remove-if
                          (lambda (field)
                            (or reached-end
                                (when (string-match "[\r\n]" field)
                                  (setq reached-end t)
                                  nil)))
                          (split-string
                           (substring text match-end)
                           "[\n\t\r ]*,[\n\t\r ]*" t))))))
                (setq note t)
                (add-to-list
                 'intero-suggestions
                 (list :type 'add-missing-fields
                       :fields fields
                       :line (flycheck-error-line msg)
                       :column (flycheck-error-column msg)))
                (setq start (min (length text) (1+ match-end))))))

          ;; Messages of this format:
          ;;
          ;; Can't make a derived instance of ‘Functor X’:
