Skip to content

Commit

Permalink
Make haskell-align-imports-padding a total function
Browse files Browse the repository at this point in the history
  • Loading branch information
jwiegley committed Apr 2, 2014
1 parent 110aa35 commit a0a33d3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions haskell-align-imports.el
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,11 @@

(defun haskell-align-imports-padding (imports)
"Find the padding for each part of the import statements."
(reduce (lambda (a b) (mapcar* #'max a b))
(mapcar (lambda (x) (mapcar #'length (car x)))
imports)))
(if (null imports)
imports
(reduce (lambda (a b) (mapcar* #'max a b))
(mapcar (lambda (x) (mapcar #'length (car x)))
imports))))

(defun haskell-align-imports-fill (padding line)
"Fill an import line using the padding worked out from all statements."
Expand Down

0 comments on commit a0a33d3

Please sign in to comment.