Function: haskell-lexeme-looking-at-char-literal
haskell-lexeme-looking-at-char-literal is a natively compiled function
defined in haskell-lexeme.el.
Signature
(haskell-lexeme-looking-at-char-literal)
Documentation
Non-nil when point is at a char literal lookalike.
Note that this function matches more than Haskell Report specifies because we want to support also code under edit.
Char literals end with a quote or an unescaped newline or end of buffer.
After successful match:
(match-text 1) matches the opening quote.
(match-text 2) matches the inside of the char literla.
(match-text 3) matches the closing quote, or a closing
newline or is nil when at the end of the buffer.
Source Code
;; Defined in /nix/store/9lz2mhw95f9fqxr9mnq46k3f6qz3aq83-emacs-packages-deps/share/emacs/site-lisp/elpa/haskell-mode-20260904.1042/haskell-lexeme.el
(defun haskell-lexeme-looking-at-char-literal ()
"Non-nil when point is at a char literal lookalike.
Note that this function matches more than Haskell Report
specifies because we want to support also code under edit.
Char literals end with a quote or an unescaped newline or end
of buffer.
After successful match:
(match-text 1) matches the opening quote.
(match-text 2) matches the inside of the char literla.
(match-text 3) matches the closing quote, or a closing
newline or is nil when at the end of the buffer."
(when (looking-at haskell-lexeme--char-literal-rx)
(set-match-data
(list (match-beginning 0) (match-end 0)
(match-beginning 1) (match-end 1)
(or (match-beginning 2) (match-beginning 4)) (or (match-end 2) (match-end 4))
(or (match-beginning 3) (match-beginning 5)) (or (match-end 3) (match-end 5))))
t))