Closed
Description
haskell-indentation currently can't handle names starting with quotes used by the TemplateHaskell and DataKinds ghc extensions.
e.g. (both 'A are needed to get this) :
a = a (a 'A))
a 'A
^ ^ indentation point is here
| but should be here
A quick fix is to change
(if (or (looking-at "'\\([^\\']\\|\\\\.\\)*'")
(looking-at "\"\\([^\\\"]\\|\\\\.\\)*\"")
(looking-at ; Hierarchical names always start with uppercase
"[[:upper:]]\\(\\s_\\|\\sw\\|'\\)*\\(\\.\\(\\s_\\|\\sw\\|'\\)+\\)*")
(looking-at "\\(\\s_\\|\\sw\\)\\(\\s_\\|\\sw\\|'\\)*") ; Only unqualified vars can start with lowercase
(looking-at "[0-9][0-9oOxXeE+-]*")
(looking-at "[-:!#$%&*+./<=>?@\\\\^|~]+")
(looking-at "[](){}[,;]")
(looking-at "`[[:alnum:]']*`"))
to
(if (or (looking-at "\"\\([^\\\"]\\|\\\\.\\)*\"")
(looking-at ; Hierarchical names always start with uppercase
"[[:upper:]]\\(\\s_\\|\\sw\\|'\\)*\\(\\.\\(\\s_\\|\\sw\\|'\\)+\\)*")
(looking-at "\\(\\s_\\|\\sw\\)\\(\\s_\\|\\sw\\|'\\)*") ; Only unqualified vars can start with lowercase
(looking-at "[0-9][0-9oOxXeE+-]*")
(looking-at "[-:!#$%&*+./<=>?@\\\\^|~]+")
(looking-at "[](){}[,;]")
(looking-at "`[[:alnum:]']*`")
(looking-at "'\\([^\\']\\|\\\\.\\)*'"))
in haskell-indentation.el, i.e. to give char literals a lower precedence. It doen't seem to break anything, but I haven't really used it yet.
Metadata
Metadata
Assignees
Labels
No labels