diff --git a/syntaxes/haskell.tmLanguage b/syntaxes/haskell.tmLanguage index 41b0dd3..e701703 100644 --- a/syntaxes/haskell.tmLanguage +++ b/syntaxes/haskell.tmLanguage @@ -46,7 +46,15 @@ comment In case this regex seems unusual for an infix operator, note that Haskell allows any ordinary function application (elem 4 [1..10]) to be rewritten as an infix expression (4 `elem` [1..10]). match - (`)([\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*\.)*[\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*(`) + (`)(([\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}'\.]*)\.)?[\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*(`) + captures + + 3 + + name + entity.name.namespace + + name keyword.operator.function.infix.haskell @@ -490,6 +498,10 @@ include #data_constructor + + include + #qualifier + include #comments @@ -735,7 +747,7 @@ match (?<conid>[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*(\.\g<conid>)?) name - support.other.module.haskell + entity.name.namespace pragma @@ -756,11 +768,18 @@ data_constructor + + match + \b[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*(?!\.)\b + name + constant.other.haskell + + qualifier match - \b[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*\b + \b[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*(?=\.)\b name - constant.other.haskell + meta.import.qualifier.haskell type_signature @@ -843,10 +862,16 @@ match - \b[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* + \b[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*(?!\.)\b name storage.type.haskell + + match + \b[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*(?=\.) + name + entity.name.namespace + include #comments