| Server IP : 152.69.216.235 / Your IP : 80.80.80.28 Web Server : Apache/2.4.37 (Oracle Linux Server) System : Linux ust-wp4-prod 5.15.0-310.184.5.2.el8uek.x86_64 #2 SMP Wed Jul 9 16:08:33 PDT 2025 x86_64 User : apache ( 48) PHP Version : 8.4.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/source-highlight/ |
Upload File : |
# Quick and dirty Haskell highlight rules for GNU Source-highlight and SHJS
# Sergey Astanin
# Feel free to improve according to http://www.haskell.org/onlinereport/lexemes.html
# Source-highlight docs: http://www.gnu.org/software/src-highlite/source-highlight.html#Language-Definitions
# SHJS docs: http://shjs.sourceforge.net/doc/documentation.html
# as number.lang but also with Haskell octals
number =
'\<[+-]?((0x[[:xdigit:]]+)|(0[oO][0-7]+)|(([[:digit:]]*\.)?
[[:digit:]]+([eE][+-]?[[:digit:]]+)?))u?((int(?:8|16|32|64))|L)?\>'
# strings and chars (including non-control escapes)
string delim "\"" "\"" escape "\\"
string = '\'([^\\\']{1}|\\[\\\'0abfnrtv"&]|\\[[:digit:]]+|\\[oO][0-7]+|\\[xX][[:xdigit:]]+)\''
# show some syntax errors with "regex" style
regex = '\'[^\\\']{2,}\''
keyword = '\<(case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)\>'
comment delim "{-" "-}" multiline nested
# -- An end-of-line comment
# but -->, <--, |-- and --| are not comments in Haskell!
symbol = '([!#$$%*+\./<=>\?@\\\^\|\-~:]+)--'
comment start '(--)(?![!#$$%*+\./<=>\?@\\\^\|\-~:]+)'
# dont highlight types in qualified names, borrowed from caml.lang
type = '\<(?:[A-Z][\w\']*)\>(?![\.])'
symbol =
"!","#","$","%","&","*","+",".","/","<","=",">","?","@","\\","^","\|","-","~",
"(",")",",",";","[","]","`","{","}",
":"
cbracket = "{|}"