PageRenderTime 78ms CodeModel.GetById 74ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-0-pre5/modes/haskell.xml

#
XML | 191 lines | 168 code | 15 blank | 8 comment | 0 complexity | 137b532279048f73aceb62d43cd6f0e9 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		<WHITESPACE> </WHITESPACE>
 23		<WHITESPACE>	</WHITESPACE>
 24
 25		<!-- Pragmas. -->
 26		<SPAN TYPE="COMMENT2">
 27			<BEGIN>{-#</BEGIN>
 28			<END>#-}</END>
 29		</SPAN>
 30
 31		<SPAN TYPE="COMMENT1">
 32			<BEGIN>{-</BEGIN>
 33			<END>-}</END>
 34		</SPAN>
 35
 36		<EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
 37
 38		<SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
 39			<BEGIN>"</BEGIN>
 40			<END>"</END>
 41		</SPAN>
 42
 43		<!-- ' causes problems because not all ' are character
 44		definitions. I implemented an ugly and partial workaround. -->
 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">','</SEQ>
 63		<SEQ TYPE="LITERAL1">':'</SEQ>
 64		<SEQ TYPE="LITERAL1">';'</SEQ>
 65		<SEQ TYPE="LITERAL1">'&lt;'</SEQ>
 66		<SEQ TYPE="LITERAL1">'&gt;'</SEQ>
 67		<SEQ TYPE="LITERAL1">'|'</SEQ>
 68		<SEQ TYPE="LITERAL1">'@'</SEQ>
 69
 70		<SPAN TYPE="LITERAL1" NO_WORD_BREAK="TRUE">
 71			<BEGIN>'</BEGIN>
 72			<END>'</END>
 73		</SPAN>
 74
 75		<SEQ TYPE="NULL">(</SEQ>
 76		<SEQ TYPE="NULL">)</SEQ>
 77		<SEQ TYPE="NULL">[</SEQ>
 78		<SEQ TYPE="NULL">]</SEQ>
 79		<SEQ TYPE="NULL">,</SEQ>
 80		<SEQ TYPE="NULL">;</SEQ>
 81		<SEQ TYPE="NULL">`</SEQ>
 82
 83		<SEQ TYPE="OPERATOR">..</SEQ>
 84		<SEQ TYPE="OPERATOR">&amp;&amp;</SEQ>
 85		<SEQ TYPE="OPERATOR">::</SEQ>
 86
 87		<SEQ TYPE="OPERATOR">&lt;</SEQ>
 88		<SEQ TYPE="OPERATOR">&gt;</SEQ>
 89		<SEQ TYPE="OPERATOR">+</SEQ>
 90		<SEQ TYPE="OPERATOR">-</SEQ>
 91		<SEQ TYPE="OPERATOR">*</SEQ>
 92		<SEQ TYPE="OPERATOR">/</SEQ>
 93		<SEQ TYPE="OPERATOR">%</SEQ>
 94		<SEQ TYPE="OPERATOR">^</SEQ>
 95		<SEQ TYPE="OPERATOR">=</SEQ>
 96		<SEQ TYPE="OPERATOR">|</SEQ>
 97		<SEQ TYPE="OPERATOR">@</SEQ>
 98		<SEQ TYPE="OPERATOR">~</SEQ>
 99		<SEQ TYPE="OPERATOR">!</SEQ>
100		<SEQ TYPE="OPERATOR">$</SEQ>
101
102		<!-- Defining this as OPERATOR causes float numbers not to be
103		highlighted... Which is more important? -->
104		<SEQ TYPE="NULL">.</SEQ>
105
106		<KEYWORDS IGNORE_CASE="FALSE">
107			<!-- Reserved words. -->
108			<KEYWORD1>case</KEYWORD1>
109			<KEYWORD1>class</KEYWORD1>
110			<KEYWORD1>data</KEYWORD1>
111			<KEYWORD1>default</KEYWORD1>
112			<KEYWORD1>deriving</KEYWORD1>
113			<KEYWORD1>do</KEYWORD1>
114			<KEYWORD1>else</KEYWORD1>
115			<KEYWORD1>if</KEYWORD1>
116			<KEYWORD1>import</KEYWORD1>
117			<KEYWORD1>in</KEYWORD1>
118			<KEYWORD1>infix</KEYWORD1>
119			<KEYWORD1>infixl</KEYWORD1>
120			<KEYWORD1>infixr</KEYWORD1>
121			<KEYWORD1>instance</KEYWORD1>
122			<KEYWORD1>let</KEYWORD1>
123			<KEYWORD1>module</KEYWORD1>
124			<KEYWORD1>newtype</KEYWORD1>
125			<KEYWORD1>of</KEYWORD1>
126			<KEYWORD1>then</KEYWORD1>
127			<KEYWORD1>type</KEYWORD1>
128			<KEYWORD1>where</KEYWORD1>
129			<KEYWORD1>_</KEYWORD1>
130			<KEYWORD1>as</KEYWORD1>
131			<KEYWORD1>qualified</KEYWORD1>
132			<KEYWORD1>hiding</KEYWORD1>
133
134			<KEYWORD3>Addr</KEYWORD3>
135			<KEYWORD3>Bool</KEYWORD3>
136			<KEYWORD3>Bounded</KEYWORD3>
137			<KEYWORD3>Char</KEYWORD3>
138			<KEYWORD3>Double</KEYWORD3>
139			<KEYWORD3>Either</KEYWORD3>
140			<KEYWORD3>Enum</KEYWORD3>
141			<KEYWORD3>Eq</KEYWORD3>
142			<KEYWORD3>FilePath</KEYWORD3>
143			<KEYWORD3>Float</KEYWORD3>
144			<KEYWORD3>Floating</KEYWORD3>
145			<KEYWORD3>Fractional</KEYWORD3>
146			<KEYWORD3>Functor</KEYWORD3>
147			<KEYWORD3>IO</KEYWORD3>
148			<KEYWORD3>IOError</KEYWORD3>
149			<KEYWORD3>IOResult</KEYWORD3>
150			<KEYWORD3>Int</KEYWORD3>
151			<KEYWORD3>Integer</KEYWORD3>
152			<KEYWORD3>Integral</KEYWORD3>
153			<KEYWORD3>Ix</KEYWORD3>
154			<KEYWORD3>Maybe</KEYWORD3>
155			<KEYWORD3>Monad</KEYWORD3>
156			<KEYWORD3>Num</KEYWORD3>
157			<KEYWORD3>Ord</KEYWORD3>
158			<KEYWORD3>Ordering</KEYWORD3>
159			<KEYWORD3>Ratio</KEYWORD3>
160			<KEYWORD3>Rational</KEYWORD3>
161			<KEYWORD3>Read</KEYWORD3>
162			<KEYWORD3>ReadS</KEYWORD3>
163			<KEYWORD3>Real</KEYWORD3>
164			<KEYWORD3>RealFloat</KEYWORD3>
165			<KEYWORD3>RealFrac</KEYWORD3>
166			<KEYWORD3>Show</KEYWORD3>
167			<KEYWORD3>ShowS</KEYWORD3>
168			<KEYWORD3>String</KEYWORD3>
169
170			<LITERAL2>:</LITERAL2>
171			<LITERAL2>EQ</LITERAL2>
172			<LITERAL2>False</LITERAL2>
173			<LITERAL2>GT</LITERAL2>
174			<LITERAL2>Just</LITERAL2>
175			<LITERAL2>LT</LITERAL2>
176			<LITERAL2>Left</LITERAL2>
177			<LITERAL2>Nothing</LITERAL2>
178			<LITERAL2>Right</LITERAL2>
179			<LITERAL2>True</LITERAL2>
180
181			<OPERATOR>quot</OPERATOR>
182			<OPERATOR>rem</OPERATOR>
183			<OPERATOR>div</OPERATOR>
184			<OPERATOR>mod</OPERATOR>
185			<OPERATOR>elem</OPERATOR>
186			<OPERATOR>notElem</OPERATOR>
187			<OPERATOR>seq</OPERATOR>
188		</KEYWORDS>
189	</RULES>
190
191</MODE>