Function: haskell-utils-reduce-string
haskell-utils-reduce-string is a natively compiled function defined in
haskell-utils.el.
Signature
(haskell-utils-reduce-string STR)
Documentation
Remove newlines and extra whitespace from string STR.
If line starts with a sequence of whitespaces, substitutes this sequence with a single whitespace. Removes all newline characters.
Source Code
;; Defined in /nix/store/9lz2mhw95f9fqxr9mnq46k3f6qz3aq83-emacs-packages-deps/share/emacs/site-lisp/elpa/haskell-mode-20260904.1042/haskell-utils.el
(defun haskell-utils-reduce-string (str)
"Remove newlines and extra whitespace from string STR.
If line starts with a sequence of whitespaces, substitutes this
sequence with a single whitespace. Removes all newline
characters."
(let ((s (replace-regexp-in-string "^\s+" " " str)))
(replace-regexp-in-string "\r?\n" "" s)))