Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion haskell-indentation.el
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,8 @@ line."
(defun haskell-indentation-skip-token ()
"Skip to the next token."
(let ((case-fold-search nil))
(if (or (looking-at "'\\([^\\']\\|\\\\.\\)*'")
(if (or (looking-at "'\\([^\\']\\|\\\\.\\)'")
(looking-at "'\\\\\\([^\\']\\|\\\\.\\)*'")
(looking-at "\"\\([^\\\"]\\|\\\\.\\)*\"")
;; Hierarchical names always start with uppercase
(looking-at
Expand Down
20 changes: 20 additions & 0 deletions tests/haskell-indentation-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -570,4 +570,24 @@ foo = do
"
((4 0) 4))

(hindent-test "28a names starting with quotes" "
f = a (a 'A)
(a 'A)
"
((2 0) 0 4))

(hindent-test "28b character literal (escape sequence)" "
f = '\\\\'

"
((2 0) 0 4))


(hindent-test "28c name starting with a quote" "
function (Operation 'Init) = do
print 'Init
"
((2 0) 2))


;;; haskell-indentation-tests.el ends here