Function: haskell-align-imports

haskell-align-imports is an interactive and natively compiled function defined in haskell-align-imports.el.

Signature

(haskell-align-imports)

Documentation

Align all the imports in the buffer.

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/9lz2mhw95f9fqxr9mnq46k3f6qz3aq83-emacs-packages-deps/share/emacs/site-lisp/elpa/haskell-mode-20260904.1042/haskell-align-imports.el
;;;###autoload
(defun haskell-align-imports ()
  "Align all the imports in the buffer."
  (interactive)
  (when (haskell-align-imports-line-match)
    (save-excursion
      (goto-char (point-min))
      (let* ((imports (haskell-align-imports-collect))
             (padding (haskell-align-imports-padding imports)))
        (mapc (lambda (x)
                (goto-char (cdr x))
                (delete-region (point) (line-end-position))
                (insert (haskell-align-imports-chomp
                         (haskell-align-imports-fill padding (car x)))))
              imports))))
  nil)