PageRenderTime 52ms CodeModel.GetById 48ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/jEdit/tags/jedit-4-2-pre14/modes/haskell.xml

#
XML | 180 lines | 157 code | 14 blank | 9 comment | 0 complexity | ab926c8bfc4a7ed802673666e71ce356 MD5 | raw file
  1<?xml version="1.0"?>
  2
  3<!DOCTYPE MODE SYSTEM "xmode.dtd">
  4
  5<!--
  6	Haskell mode by Kristian Ovaska (kristian.ovaska@helsinki.fi)
  7	Based on Haskell 98
  8-->
  9
 10<MODE>
 11
 12	<PROPS>
 13		<PROPERTY NAME="commentStart" VALUE="{-" />
 14		<PROPERTY NAME="commentEnd" VALUE="-}" />
 15		<PROPERTY NAME="lineComment" VALUE="--" />
 16		<!-- apparently, this is required... -->
 17		<PROPERTY NAME="tabSize" VALUE="8" />
 18		<PROPERTY NAME="indentSize" VALUE="8" />
 19	</PROPS>
 20
 21	<RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE" ESCAPE="\">
 22		<!-- Pragmas. -->
 23		<SPAN TYPE="COMMENT2">
 24			<BEGIN>{-#</BEGIN>
 25			<END>#-}</END>
 26		</SPAN>
 27
 28		<SPAN TYPE="COMMENT1">
 29			<BEGIN>{-</BEGIN>
 30			<END>-}</END>
 31		</SPAN>
 32
 33		<EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
 34
 35		<SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
 36			<BEGIN>"</BEGIN>
 37			<END>"</END>
 38		</SPAN>
 39
 40		<!-- ' causes problems because not all ' are character
 41		definitions. I implemented an ugly and partial workaround. -->
 42		<SEQ TYPE="LITERAL1">' '</SEQ>
 43		<SEQ TYPE="LITERAL1">'!'</SEQ>
 44		<SEQ TYPE="LITERAL1">'"'</SEQ>
 45		<SEQ TYPE="LITERAL1">'$'</SEQ>
 46		<SEQ TYPE="LITERAL1">'%'</SEQ>
 47		<SEQ TYPE="LITERAL1">'/'</SEQ>
 48		<SEQ TYPE="LITERAL1">'('</SEQ>
 49		<SEQ TYPE="LITERAL1">')'</SEQ>
 50		<SEQ TYPE="LITERAL1">'['</SEQ>
 51		<SEQ TYPE="LITERAL1">']'</SEQ>
 52		<SEQ TYPE="LITERAL1">'+'</SEQ>
 53		<SEQ TYPE="LITERAL1">'-'</SEQ>
 54		<SEQ TYPE="LITERAL1">'*'</SEQ>
 55		<SEQ TYPE="LITERAL1">'='</SEQ>
 56		<SEQ TYPE="LITERAL1">'/'</SEQ>
 57		<SEQ TYPE="LITERAL1">'^'</SEQ>
 58		<SEQ TYPE="LITERAL1">'.'</SEQ>
 59		<SEQ TYPE="LITERAL1">','</SEQ>
 60		<SEQ TYPE="LITERAL1">':'</SEQ>
 61		<SEQ TYPE="LITERAL1">';'</SEQ>
 62		<SEQ TYPE="LITERAL1">'&lt;'</SEQ>
 63		<SEQ TYPE="LITERAL1">'&gt;'</SEQ>
 64		<SEQ TYPE="LITERAL1">'|'</SEQ>
 65		<SEQ TYPE="LITERAL1">'@'</SEQ>
 66
 67		<SPAN TYPE="LITERAL1" NO_WORD_BREAK="TRUE">
 68			<BEGIN>'</BEGIN>
 69			<END>'</END>
 70		</SPAN>
 71
 72		<SEQ TYPE="OPERATOR">..</SEQ>
 73		<SEQ TYPE="OPERATOR">&amp;&amp;</SEQ>
 74		<SEQ TYPE="OPERATOR">::</SEQ>
 75
 76		<SEQ TYPE="OPERATOR">&lt;</SEQ>
 77		<SEQ TYPE="OPERATOR">&gt;</SEQ>
 78		<SEQ TYPE="OPERATOR">+</SEQ>
 79		<SEQ TYPE="OPERATOR">-</SEQ>
 80		<SEQ TYPE="OPERATOR">*</SEQ>
 81		<SEQ TYPE="OPERATOR">/</SEQ>
 82		<SEQ TYPE="OPERATOR">%</SEQ>
 83		<SEQ TYPE="OPERATOR">^</SEQ>
 84		<SEQ TYPE="OPERATOR">=</SEQ>
 85		<SEQ TYPE="OPERATOR">|</SEQ>
 86		<SEQ TYPE="OPERATOR">@</SEQ>
 87		<SEQ TYPE="OPERATOR">~</SEQ>
 88		<SEQ TYPE="OPERATOR">!</SEQ>
 89		<SEQ TYPE="OPERATOR">$</SEQ>
 90
 91		<!-- Defining this as OPERATOR causes float numbers not to be
 92		highlighted... Which is more important? -->
 93		<!-- <SEQ TYPE="NULL">.</SEQ> -->
 94
 95		<KEYWORDS>
 96			<!-- Reserved words. -->
 97			<KEYWORD1>case</KEYWORD1>
 98			<KEYWORD1>class</KEYWORD1>
 99			<KEYWORD1>data</KEYWORD1>
100			<KEYWORD1>default</KEYWORD1>
101			<KEYWORD1>deriving</KEYWORD1>
102			<KEYWORD1>do</KEYWORD1>
103			<KEYWORD1>else</KEYWORD1>
104			<KEYWORD1>if</KEYWORD1>
105			<KEYWORD1>import</KEYWORD1>
106			<KEYWORD1>in</KEYWORD1>
107			<KEYWORD1>infix</KEYWORD1>
108			<KEYWORD1>infixl</KEYWORD1>
109			<KEYWORD1>infixr</KEYWORD1>
110			<KEYWORD1>instance</KEYWORD1>
111			<KEYWORD1>let</KEYWORD1>
112			<KEYWORD1>module</KEYWORD1>
113			<KEYWORD1>newtype</KEYWORD1>
114			<KEYWORD1>of</KEYWORD1>
115			<KEYWORD1>then</KEYWORD1>
116			<KEYWORD1>type</KEYWORD1>
117			<KEYWORD1>where</KEYWORD1>
118			<KEYWORD1>_</KEYWORD1>
119			<KEYWORD1>as</KEYWORD1>
120			<KEYWORD1>qualified</KEYWORD1>
121			<KEYWORD1>hiding</KEYWORD1>
122
123			<KEYWORD3>Addr</KEYWORD3>
124			<KEYWORD3>Bool</KEYWORD3>
125			<KEYWORD3>Bounded</KEYWORD3>
126			<KEYWORD3>Char</KEYWORD3>
127			<KEYWORD3>Double</KEYWORD3>
128			<KEYWORD3>Either</KEYWORD3>
129			<KEYWORD3>Enum</KEYWORD3>
130			<KEYWORD3>Eq</KEYWORD3>
131			<KEYWORD3>FilePath</KEYWORD3>
132			<KEYWORD3>Float</KEYWORD3>
133			<KEYWORD3>Floating</KEYWORD3>
134			<KEYWORD3>Fractional</KEYWORD3>
135			<KEYWORD3>Functor</KEYWORD3>
136			<KEYWORD3>IO</KEYWORD3>
137			<KEYWORD3>IOError</KEYWORD3>
138			<KEYWORD3>IOResult</KEYWORD3>
139			<KEYWORD3>Int</KEYWORD3>
140			<KEYWORD3>Integer</KEYWORD3>
141			<KEYWORD3>Integral</KEYWORD3>
142			<KEYWORD3>Ix</KEYWORD3>
143			<KEYWORD3>Maybe</KEYWORD3>
144			<KEYWORD3>Monad</KEYWORD3>
145			<KEYWORD3>Num</KEYWORD3>
146			<KEYWORD3>Ord</KEYWORD3>
147			<KEYWORD3>Ordering</KEYWORD3>
148			<KEYWORD3>Ratio</KEYWORD3>
149			<KEYWORD3>Rational</KEYWORD3>
150			<KEYWORD3>Read</KEYWORD3>
151			<KEYWORD3>ReadS</KEYWORD3>
152			<KEYWORD3>Real</KEYWORD3>
153			<KEYWORD3>RealFloat</KEYWORD3>
154			<KEYWORD3>RealFrac</KEYWORD3>
155			<KEYWORD3>Show</KEYWORD3>
156			<KEYWORD3>ShowS</KEYWORD3>
157			<KEYWORD3>String</KEYWORD3>
158
159			<LITERAL2>:</LITERAL2>
160			<LITERAL2>EQ</LITERAL2>
161			<LITERAL2>False</LITERAL2>
162			<LITERAL2>GT</LITERAL2>
163			<LITERAL2>Just</LITERAL2>
164			<LITERAL2>LT</LITERAL2>
165			<LITERAL2>Left</LITERAL2>
166			<LITERAL2>Nothing</LITERAL2>
167			<LITERAL2>Right</LITERAL2>
168			<LITERAL2>True</LITERAL2>
169
170			<OPERATOR>quot</OPERATOR>
171			<OPERATOR>rem</OPERATOR>
172			<OPERATOR>div</OPERATOR>
173			<OPERATOR>mod</OPERATOR>
174			<OPERATOR>elem</OPERATOR>
175			<OPERATOR>notElem</OPERATOR>
176			<OPERATOR>seq</OPERATOR>
177		</KEYWORDS>
178	</RULES>
179
180</MODE>