@@ -63,16 +63,27 @@ syn match purescriptImportParams "hiding" contained
6363 \ nextgroup= purescriptModuleParams,purescriptImportParams skipwhite
6464
6565" Function declaration
66- syn region purescriptFunctionDecl excludenl start =" ^\z (\s *\)\( foreign\s\+ import\_ s\+\)\? [_a-z]\(\w\|\'\) *\_ s\{ -}\( ::\| ∷\) " end =" ^\z 1\=\S " me =s - 1 ,re =s - 1 keepend
66+ syn region purescriptFunctionDecl
67+ \ excludenl start = " ^\z (\s *\)\(\( foreign\s\+ import\)\_ s\+\)\? [_a-z]\(\w\|\'\) *\_ s\{ -}\( ::\| ∷\) "
68+ \ end = " ^\z 1\=\S " me= s - 1 ,re = s - 1 keepend
6769 \ contains= purescriptFunctionDeclStart,purescriptForall,purescriptOperatorType,purescriptOperatorTypeSig,purescriptType,purescriptTypeVar,purescriptDelimiter,@p urescriptComment
68- syn match purescriptFunctionDeclStart " ^\s *\( foreign\s\+ import\_ s\+\)\?\( [_a-z]\(\w\|\'\) *\)\_ s\{ -}\( ::\| ∷\) " contained
69- \ contains= purescriptImportKeyword,purescriptFunction,purescriptOperatorType
70+ syn region purescriptFunctionDecl
71+ \ excludenl start = " ^\z (\s *\) where\z (\s\+\) [_a-z]\(\w\|\'\) *\_ s\{ -}\( ::\| ∷\) "
72+ \ end = " ^\(\z 1\s\{ 5}\z 2\)\=\S " me= s - 1 ,re = s - 1 keepend
73+ \ contains= purescriptFunctionDeclStart,purescriptForall,purescriptOperatorType,purescriptOperatorTypeSig,purescriptType,purescriptTypeVar,purescriptDelimiter,@p urescriptComment
74+ syn region purescriptFunctionDecl
75+ \ excludenl start = " ^\z (\s *\) let\z (\s\+\) [_a-z]\(\w\|\'\) *\_ s\{ -}\( ::\| ∷\) "
76+ \ end = " ^\(\z 1\s\{ 3}\z 2\)\=\S " me= s - 1 ,re = s - 1 keepend
77+ \ contains= purescriptFunctionDeclStart,purescriptForall,purescriptOperatorType,purescriptOperatorTypeSig,purescriptType,purescriptTypeVar,purescriptDelimiter,@p urescriptComment
78+ syn match purescriptFunctionDeclStart " ^\s *\(\( foreign\s\+ import\| let\| where\)\_ s\+\)\?\( [_a-z]\(\w\|\'\) *\)\_ s\{ -}\( ::\| ∷\) " contained
79+ \ contains= purescriptImportKeyword,purescriptWhere,purescriptLet,purescriptFunction,purescriptOperatorType
7080syn keyword purescriptForall forall
7181syn match purescriptForall " ∀"
7282
7383" Keywords
7484syn keyword purescriptConditional if then else
75- syn keyword purescriptStatement do case of let in
85+ syn keyword purescriptStatement do case of in
86+ syn keyword purescriptLet let
7687syn keyword purescriptWhere where
7788syn match purescriptStructure " \<\( data\| newtype\| type\| class\| kind\)\> "
7889 \ nextgroup= purescriptType skipwhite
@@ -166,6 +177,7 @@ highlight def link purescriptBlockComment purescriptComment
166177highlight def link purescriptStructure purescriptKeyword
167178highlight def link purescriptKeyword Keyword
168179highlight def link purescriptStatement Statement
180+ highlight def link purescriptLet Statement
169181highlight def link purescriptOperator Operator
170182highlight def link purescriptFunction Function
171183highlight def link purescriptType Type
0 commit comments