diff options
author | Georg Brandl <georg@python.org> | 2017-01-22 18:44:31 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2017-01-22 18:44:31 +0000 |
commit | dbfa7bbacf9ec1a987f632f01c040285269f690b (patch) | |
tree | 47c1a3ce937fc6a670bbab0cd322327dd5970bd3 /pygments/lexers/haskell.py | |
parent | f15116bf803ec61d2d2e4eb7204260809d2819ca (diff) | |
parent | c7ecb95b83ca4ceb79d8c6020ef328629576d73d (diff) | |
download | pygments-dbfa7bbacf9ec1a987f632f01c040285269f690b.tar.gz |
Merged in EricFromCanada/pygments-main (pull request #619)
update LassoLexer
Diffstat (limited to 'pygments/lexers/haskell.py')
-rw-r--r-- | pygments/lexers/haskell.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pygments/lexers/haskell.py b/pygments/lexers/haskell.py index ffc3a3a2..9020ceb6 100644 --- a/pygments/lexers/haskell.py +++ b/pygments/lexers/haskell.py @@ -5,7 +5,7 @@ Lexers for Haskell and related languages. - :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -39,7 +39,7 @@ class HaskellLexer(RegexLexer): flags = re.MULTILINE | re.UNICODE reserved = ('case', 'class', 'data', 'default', 'deriving', 'do', 'else', - 'if', 'in', 'infix[lr]?', 'instance', + 'family', 'if', 'in', 'infix[lr]?', 'instance', 'let', 'newtype', 'of', 'then', 'type', 'where', '_') ascii = ('NUL', 'SOH', '[SE]TX', 'EOT', 'ENQ', 'ACK', 'BEL', 'BS', 'HT', 'LF', 'VT', 'FF', 'CR', 'S[OI]', 'DLE', @@ -63,6 +63,9 @@ class HaskellLexer(RegexLexer): (r'^[_' + uni.Ll + r'][\w\']*', Name.Function), (r"'?[_" + uni.Ll + r"][\w']*", Name), (r"('')?[" + uni.Lu + r"][\w\']*", Keyword.Type), + (r"(')[" + uni.Lu + r"][\w\']*", Keyword.Type), + (r"(')\[[^\]]*\]", Keyword.Type), # tuples and lists get special treatment in GHC + (r"(')\([^\)]*\)", Keyword.Type), # .. # Operators (r'\\(?![:!#$%&*+.\\/<=>?@^|~-]+)', Name.Function), # lambda operator (r'(<-|::|->|=>|=)(?![:!#$%&*+.\\/<=>?@^|~-]+)', Operator.Word), # specials |