highlight datakind types correctly

This commit is contained in:
raichoo 2014-09-22 11:00:32 +02:00
parent bc81c4d67b
commit 923ce09141

View file

@ -36,12 +36,12 @@ syn keyword haskellBottom undefined error
syn match haskellOperators "\([-!#$%&\*\+/<=>\?@\\^|~:]\|\<_\>\)"
syn match haskellDot "\."
syn match haskellLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$" contains=@Spell
syn match haskellChar "'[^'\\]'\|'\\.'\|'\\u[0-9a-fA-F]\{4}'"
syn match haskellBacktick "`[A-Za-z][A-Za-z0-9_\.]*'*`"
syn region haskellString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
syn region haskellBlockComment start="{-" end="-}" contains=haskellBlockComment,@Spell
syn match haskellIdentifier "[_a-z][a-zA-z0-9_]*'*" contained
syn match haskellType "\<[A-Z][a-zA-Z0-9_]*'*\>"
syn match haskellType "'\?\<[A-Z][a-zA-Z0-9_]*'*\>"
syn match haskellChar "'[^'\\]'\|'\\.'\|'\\u[0-9a-fA-F]\{4}'"
syn match haskellTopLevelDecl "^\s*[_a-z][a-zA-z0-9_]*'*\s*::" contains=haskellIdentifier,haskellOperators
syn match haskellRecordField "[_a-z][a-zA-z0-9_]*'*\s*::" contains=haskellIdentifier,haskellOperators contained
syn region haskellRecordBlock start="[A-Z][a-zA-Z0-9]*'*\s\+{" end="}" keepend