Function: haskell-indentation-previous-indentation
haskell-indentation-previous-indentation is a natively compiled
function defined in haskell-indentation.el.
Signature
(haskell-indentation-previous-indentation COL INDENTATIONS &optional NOFAIL)
Documentation
Find the rightmost indentation less than COL from INDENTATIONS.
When no indentations are less than COL, return the rightmost indentation if NOFAIL is non-nil, or nil otherwise.
Source Code
;; Defined in /nix/store/9lz2mhw95f9fqxr9mnq46k3f6qz3aq83-emacs-packages-deps/share/emacs/site-lisp/elpa/haskell-mode-20260904.1042/haskell-indentation.el
(defun haskell-indentation-previous-indentation (col indentations &optional nofail)
"Find the rightmost indentation less than COL from INDENTATIONS.
When no indentations are less than COL, return the rightmost indentation
if NOFAIL is non-nil, or nil otherwise."
(when (null indentations)
(error "haskell-indentation-previous-indentation called with empty list"))
(let ((rev (reverse indentations)))
(or (cl-find-if (lambda (i) (< i col)) rev)
(when nofail
(car rev)))))