Function: haskell-indentation-type
haskell-indentation-type is a natively compiled function defined in
haskell-indentation.el.
Signature
(haskell-indentation-type)
Documentation
Parse type declaration.
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-type ()
"Parse type declaration."
(let ((current-indent (current-column)))
(catch 'return
(while t
(cond
((member current-token '(value operator "->" "=>"))
(haskell-indentation-read-next-token))
((eq current-token 'end-tokens)
(when (member following-token
'(value operator no-following-token
"(" "[" "{" "::"))
(if (equal following-token "=>")
(haskell-indentation-add-indentation starter-indent)
(haskell-indentation-add-indentation current-indent))
(haskell-indentation-add-indentation left-indent))
(throw 'return nil))
(t (let ((parser (assoc current-token haskell-indentation-type-list)))
(if (not parser)
(throw 'return nil)
(funcall (cdr parser))))))))))