Function: haskell-cabal-classify-line

haskell-cabal-classify-line is a natively compiled function defined in haskell-cabal.el.

Signature

(haskell-cabal-classify-line)

Documentation

Classify the current line's type.

Possible results are 'section-header 'subsection-header 'section-data
'comment and 'empty

Source Code

;; Defined in /nix/store/9lz2mhw95f9fqxr9mnq46k3f6qz3aq83-emacs-packages-deps/share/emacs/site-lisp/elpa/haskell-mode-20260904.1042/haskell-cabal.el
(defun haskell-cabal-classify-line ()
  "Classify the current line's type.
Possible results are \\='section-header \\='subsection-header \\='section-data
\\='comment and \\='empty"
  (save-excursion
    (beginning-of-line)
    (cond
     ((looking-at haskell-cabal-subsection-header-regexp ) 'subsection-header)
     ((looking-at haskell-cabal-section-header-regexp) 'section-header)
     ((looking-at haskell-cabal-comment-regexp) 'comment)
     ((looking-at haskell-cabal-empty-regexp ) 'empty)
     ((looking-at haskell-cabal-conditional-regexp ) 'conditional)
     (t 'section-data))))