diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2017-05-17 11:07:28 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2017-05-17 11:07:28 +0200 |
commit | af870100716f20ee4daef9cc527a9ecf41b54114 (patch) | |
tree | 0859464c3145682cbfc29ad08de4527dd661abf7 /syntax/haskell.vim | |
parent | ef369d45a505403587ea0bae30ce6768ba51398c (diff) | |
download | vim-polyglot-af870100716f20ee4daef9cc527a9ecf41b54114.tar.gz vim-polyglot-af870100716f20ee4daef9cc527a9ecf41b54114.zip |
Update
Diffstat (limited to 'syntax/haskell.vim')
-rw-r--r-- | syntax/haskell.vim | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/syntax/haskell.vim b/syntax/haskell.vim index e301742b..1a26d1c0 100644 --- a/syntax/haskell.vim +++ b/syntax/haskell.vim @@ -13,11 +13,7 @@ elseif exists("b:current_syntax") finish endif -if !exists('g:haskell_disable_TH') - let g:haskell_disable_TH = 0 -endif - -if exists('g:haskell_backpack') && g:haskell_backpack == 1 +if get(g:, 'haskell_backpack', 0) syn keyword haskellBackpackStructure unit signature syn keyword haskellBackpackDependency dependency endif @@ -63,7 +59,7 @@ syn match haskellImport "^\s*\<import\>\s\+\(\<safe\>\s\+\)\?\(\<qualified\>\s\+ \ haskellBlockComment, \ haskellPragma syn keyword haskellKeyword do case of -if exists('g:haskell_enable_static_pointers') && g:haskell_enable_static_pointers == 1 +if get(g:, 'haskell_enable_static_pointers', 0) syn keyword haskellStatic static endif syn keyword haskellConditional if then else @@ -107,29 +103,29 @@ syn match haskellPreProc "^#.*$" syn keyword haskellTodo TODO FIXME contained " Treat a shebang line at the start of the file as a comment syn match haskellShebang "\%^#!.*$" -if exists('g:haskell_disable_TH') && g:haskell_disable_TH == 0 +if !get(g:, 'haskell_disable_TH', 0) syn match haskellQuasiQuoted "." containedin=haskellQuasiQuote contained syn region haskellQuasiQuote matchgroup=haskellTH start="\[[_a-zA-Z][a-zA-z0-9._']*|" end="|\]" syn region haskellTHBlock matchgroup=haskellTH start="\[\(d\|t\|p\)\?|" end="|]" contains=TOP syn region haskellTHDoubleBlock matchgroup=haskellTH start="\[||" end="||]" contains=TOP endif -if exists('g:haskell_enable_typeroles') && g:haskell_enable_typeroles == 1 +if get(g:, 'haskell_enable_typeroles', 0) syn keyword haskellTypeRoles phantom representational nominal contained syn region haskellTypeRoleBlock matchgroup=haskellTypeRoles start="type\s\+role" end="$" keepend \ contains= \ haskellType, \ haskellTypeRoles endif -if exists('g:haskell_enable_quantification') && g:haskell_enable_quantification == 1 +if get(g:, 'haskell_enable_quantification', 0) syn keyword haskellForall forall endif -if exists('g:haskell_enable_recursivedo') && g:haskell_enable_recursivedo == 1 +if get(g:, 'haskell_enable_recursivedo', 0) syn keyword haskellRecursiveDo mdo rec endif -if exists('g:haskell_enable_arrowsyntax') && g:haskell_enable_arrowsyntax == 1 +if get(g:, 'haskell_enable_arrowsyntax', 0) syn keyword haskellArrowSyntax proc endif -if exists('g:haskell_enable_pattern_synonyms') && g:haskell_enable_pattern_synonyms == 1 +if get(g:, 'haskell_enable_pattern_synonyms', 0) syn keyword haskellPatternKeyword pattern endif @@ -161,7 +157,7 @@ highlight def link haskellAssocType Type highlight def link haskellQuotedType Type highlight def link haskellType Type highlight def link haskellImportKeywords Include -if exists('g:haskell_classic_highlighting') && g:haskell_classic_highlighting == 1 +if get(g:, 'haskell_classic_highlighting', 0) highlight def link haskellDeclKeyword Keyword highlight def link haskellDecl Keyword highlight def link haskellWhere Keyword @@ -173,35 +169,35 @@ else highlight def link haskellLet Structure endif -if exists('g:haskell_enable_quantification') && g:haskell_enable_quantification == 1 +if get(g:, 'haskell_enable_quantification', 0) highlight def link haskellForall Operator endif -if exists('g:haskell_enable_recursivedo') && g:haskell_enable_recursivedo == 1 +if get(g:, 'haskell_enable_recursivedo', 0) highlight def link haskellRecursiveDo Keyword endif -if exists('g:haskell_enable_arrowsyntax') && g:haskell_enable_arrowsyntax == 1 +if get(g:, 'haskell_enable_arrowsyntax', 0) highlight def link haskellArrowSyntax Keyword endif -if exists('g:haskell_enable_static_pointers') && g:haskell_enable_static_pointers == 1 +if get(g:, 'haskell_enable_static_pointers', 0) highlight def link haskellStatic Keyword endif -if exists('g:haskell_classic_highlighting') && g:haskell_classic_highlighting == 1 - if exists('g:haskell_enable_pattern_synonyms') && g:haskell_enable_pattern_synonyms == 1 +if get(g:, 'haskell_classic_highlighting', 0) + if get(g:, 'haskell_enable_pattern_synonyms', 0) highlight def link haskellPatternKeyword Keyword endif - if exists('g:haskell_enable_typeroles') && g:haskell_enable_typeroles == 1 + if get(g:, 'haskell_enable_typeroles', 0) highlight def link haskellTypeRoles Keyword endif else - if exists('g:haskell_enable_pattern_synonyms') && g:haskell_enable_pattern_synonyms == 1 + if get(g:, 'haskell_enable_pattern_synonyms', 0) highlight def link haskellPatternKeyword Structure endif - if exists('g:haskell_enable_typeroles') && g:haskell_enable_typeroles == 1 + if get(g:, 'haskell_enable_typeroles', 0) highlight def link haskellTypeRoles Structure endif endif -if exists('g:haskell_backpack') && g:haskell_backpack == 1 +if get(g:, 'haskell_backpack', 0) highlight def link haskellBackpackStructure Structure highlight def link haskellBackpackDependency Include endif |