summaryrefslogtreecommitdiff
path: root/pygments/lexers/haskell.py
diff options
context:
space:
mode:
authorMatthäus G. Chajdas <dev@anteru.net>2022-03-20 10:29:30 +0100
committerMatthäus G. Chajdas <dev@anteru.net>2022-03-20 10:29:30 +0100
commit64e8e05307689fe726ce9df2d5907e9c2fb67405 (patch)
tree1d2f1eb768972ac49933367b9ec127e638cb7466 /pygments/lexers/haskell.py
parent96eaebafc848c989e9fc081768e3156add3128fd (diff)
downloadpygments-git-64e8e05307689fe726ce9df2d5907e9c2fb67405.tar.gz
Rework URL information in lexers.
This commit adds a new url field to a lexer, which can be used to link to the language website, instead of relying on having the link in either languages.rst or the docstring of the lexer. Additionally, it changes the languages.rst file to auto-generate the list of lexers from the actual source code, using the provided URL.
Diffstat (limited to 'pygments/lexers/haskell.py')
-rw-r--r--pygments/lexers/haskell.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/pygments/lexers/haskell.py b/pygments/lexers/haskell.py
index 61430f10..c5c5ca12 100644
--- a/pygments/lexers/haskell.py
+++ b/pygments/lexers/haskell.py
@@ -31,6 +31,7 @@ class HaskellLexer(RegexLexer):
.. versionadded:: 0.8
"""
name = 'Haskell'
+ url = 'https://www.haskell.org/'
aliases = ['haskell', 'hs']
filenames = ['*.hs']
mimetypes = ['text/x-haskell']
@@ -187,6 +188,7 @@ class IdrisLexer(RegexLexer):
.. versionadded:: 2.0
"""
name = 'Idris'
+ url = 'https://www.idris-lang.org/'
aliases = ['idris', 'idr']
filenames = ['*.idr']
mimetypes = ['text/x-idris']
@@ -291,13 +293,14 @@ class IdrisLexer(RegexLexer):
class AgdaLexer(RegexLexer):
"""
- For the `Agda <http://wiki.portal.chalmers.se/agda/pmwiki.php>`_
- dependently typed functional programming language and proof assistant.
+ For the Agda dependently typed functional programming language and
+ proof assistant.
.. versionadded:: 2.0
"""
name = 'Agda'
+ url = 'http://wiki.portal.chalmers.se/agda/pmwiki.php'
aliases = ['agda']
filenames = ['*.agda']
mimetypes = ['text/x-agda']
@@ -653,13 +656,13 @@ class LiterateCryptolLexer(LiterateLexer):
class KokaLexer(RegexLexer):
"""
- Lexer for the `Koka <http://koka.codeplex.com>`_
- language.
+ Lexer for the Koka language.
.. versionadded:: 1.6
"""
name = 'Koka'
+ url = 'https://koka-lang.github.io/koka/doc/index.html'
aliases = ['koka']
filenames = ['*.kk', '*.kki']
mimetypes = ['text/x-koka']