@@ -994,1001 +994,5 @@
994994 </collection>
995995
996996
997− </collections>
998−</syntax><?xml version="1.0" encoding="UTF-8"?>
999−<syntax name="haskell">
1000− <meta>
1001− <name>Haskell</name>
1002− <type>compiled</type>
1003− <preferred-file-extension>hs</preferred-file-extension>
1004− </meta>
1005−
1006− <detectors>
1007− <extension priority="1.0">hs</extension>
1008− </detectors>
1009−
1010− <comments>
1011− <single>
1012− <expression>--</expression>
1013− </single>
1014− <multiline>
1015− <starts-with>
1016− <expression>{-</expression>
1017− </starts-with>
1018− <ends-with>
1019− <expression>-}</expression>
1020− </ends-with>
1021− </multiline>
1022− </comments>
1023−
1024− <brackets>
1025− <pair open="{" close="}" />
1026− <pair open="[" close="]" />
1027− <pair open="(" close=")" />
1028− </brackets>
1029−
1030− <surrounding-pairs>
1031− <pair open="[" close="]" />
1032− <pair open="(" close=")" />
1033− <pair open="'" close="'" />
1034− <pair open=""" close=""" />
1035− <pair open="`" close="`" />
1036− </surrounding-pairs>
1037−
1038− <indentation>
1039− <increase>
1040− <expression>
1041− (case|class|do|let|where|=).*
1042− </expression>
1043− </increase>
1044− <decrease>
1045− <expression>^\\s*(end|done|with|in|else)\\b|^\\s*;;</expression>
1046− </decrease>
1047− </indentation>
1048−
1049−
1050− <scopes>
1051− <include syntax="self" collection="comments" />
1052− <include syntax="self" collection="module" />
1053− <include syntax="self" collection="import" />
1054− <include syntax="self" collection="type-family-definition" />
1055− <include syntax="self" collection="pattern-definition" />
1056− <include syntax="self" collection="type-definition" />
1057− <!-- <include syntax="self" collection="type-annotation" /> -->
1058− <include syntax="self" collection="GADT-definition" />
1059− <include syntax="self" collection="instance" />
1060− <include syntax="self" collection="typeclass" />
1061− <include syntax="self" collection="definition" />
1062− </scopes>
1063−
1064− <template-scopes>
1065− <include syntax="self" collection="Quote" />
1066− <include syntax="self" collection="comments" />
1067− </template-scopes>
1068−
1069− <collections>
1070−
1071−
1072− <collection name="operators">
1073− <scope name="keyword.modifier">
1074− <expression>(!|#|\$|%|&|⋆|\+|\.|/|<|=|>|\?|@|\\|\^|\||-|~|:)+</expression>
1075− </scope>
1076− </collection>
1077−
1078− <collection name="expressions">
1079− <include syntax="self" collection="do-bind" />
1080− <include syntax="self" collection="literal" />
1081− <include syntax="self" collection="operators" />
1082− <include syntax="self" collection="list" />
1083− <include syntax="self" collection="lambda-case" />
1084− <include syntax="self" collection="lambda-head" />
1085− <include syntax="self" collection="type-applications" />
1086− <include syntax="self" collection="outer-case-expression" />
1087− <include syntax="self" collection="qvarid" />
1088− <include syntax="self" collection="tuple" />
1089−
1090−
1091− <!-- Needed for do binds -->
1092− <!-- <include syntax="self" collection="pattern-match" /> -->
1093− </collection>
1094−
1095− <collection name="pattern-match">
1096− <include syntax="self" collection="literal" />
1097− <include syntax="self" collection="tuple-match" />
1098− <!-- <include syntax="self" collection="at-pattern" /> -->
1099− <include syntax="self" collection="varid" />
1100− <include syntax="self" collection="qconid" />
1101− <include syntax="self" collection="record-match" />
1102− <include syntax="self" collection="list-pattern" />
1103− <include syntax="self" collection="view-pattern" />
1104− </collection>
1105−
1106− <collection name="type-applications">
1107− <scope name="type-applications">
1108− <starts-with>
1109− <expression>(\s@)\(</expression>
1110− <capture number="1" name="haskell.keyword.operator.typeapplication" />
1111− </starts-with>
1112− <ends-with>
1113− <expression>)</expression>
1114− </ends-with>
1115− <subscopes>
1116− <include syntax="self" collection="type" />
1117− </subscopes>
1118− </scope>
1119− <scope name="type-applications-single">
1120− <expression>(@)(\w+)</expression>
1121− <capture number="1" name="haskell.keyword.operator.typeapplication" />
1122− <capture number="2" name="haskell.identifier.type" />
1123− </scope>
1124− </collection>
1125−
1126− <collection name="Quote">
1127− <scope name="haskell.quasiquote.string-template">
1128− <starts-with>
1129− <expression>\[((?:\w|')+)\|</expression>
1130− <capture number="1" name="haskell.identifier.constant" />
1131− </starts-with>
1132− <ends-with>
1133− <expression>\|\]</expression>
1134− </ends-with>
1135− <subscopes>
1136− <scope name="haskell.quasiquote.string-template.value">
1137− <expression>.+?</expression>
1138− </scope>
1139− </subscopes>
1140− </scope>
1141− </collection>
1142−
1143− <collection name="record-match">
1144− <include syntax="self" collection="qconid" />
1145− <include syntax="self" collection="record-fields-match" />
1146− <include syntax="self" collection="record-fields-match-all" />
1147− </collection>
1148−
1149−
1150− <collection name="record-fields-match">
1151− <scope name="record-fields-match">
1152− <symbol type="expression" />
1153− <starts-with>
1154− <expression>(\{)</expression>
1155− <capture number="1" name="haskell.pattern.record.bracket" />
1156− </starts-with>
1157− <ends-with>
1158− <expression>(\})</expression>
1159− <capture number="1" name="haskell.pattern.record.bracket" />
1160− </ends-with>
1161− <subscopes>
1162− <include syntax="self" collection="pattern-match" />
1163− <include syntax="self" collection="varid" />
1164− <scope name="record-sep">
1165− <expression>=</expression>
1166− </scope>
1167− <scope name="record-sep">
1168− <expression>,</expression>
1169− </scope>
1170− </subscopes>
1171− </scope>
1172− </collection>
1173−
1174− <collection name="record-fields-match-wildcard">
1175− <scope name="record-fields-match-all">
1176− <starts-with>
1177− <expression>(\{)</expression>
1178− <capture number="1" name="haskell.pattern.record.bracket" />
1179− </starts-with>
1180− <ends-with>
1181− <expression>(\})</expression>
1182− <capture number="1" name="haskell.pattern.record.bracket" />
1183− </ends-with>
1184− <subscopes>
1185− <scope name="haskell.pattern.record.wildcard">
1186− <expression>\.\.</expression>
1187− </scope>
1188− </subscopes>
1189− </scope>
1190− </collection>
1191−
1192− <collection name="bind-arrow">
1193− <scope name="haskell.operator.bind-arrow">
1194− <expression><-</expression>
1195− </scope>
1196− </collection>
1197−
1198−
1199− <collection name="list">
1200− <symbol type="expression" />
1201− <scope name="haskell.list">
1202− <starts-with>
1203− <expression>(\[)</expression>
1204− <capture number="1" name="haskell.list.bracket" />
1205− </starts-with>
1206− <ends-with>
1207− <expression>(\])</expression>
1208− <capture number="1" name="haskell.list.bracket" />
1209− </ends-with>
1210− <subscopes>
1211− <include syntax="self" collection="expressions" />
1212− </subscopes>
1213− </scope>
1214− </collection>
1215−
1216− <collection name="list-pattern">
1217− <symbol type="expression" />
1218− <scope name="haskell.pattern.list">
1219− <starts-with>
1220− <expression>(\[)</expression>
1221− <capture number="1" name="haskell.pattern.list.bracket" />
1222− </starts-with>
1223− <ends-with>
1224− <expression>(\])</expression>
1225− <capture number="1" name="haskell.pattern.list.bracket" />
1226− </ends-with>
1227− <subscopes>
1228− <include syntax="self" collection="pattern-match" />
1229− </subscopes>
1230− </scope>
1231− </collection>
1232−
1233−
1234− <collection name="view-pattern">
1235− <scope name="haskell.pattern.view">
1236− <symbol type="expression" />
1237− <starts-with>
1238− <expression>(\()</expression>
1239− <capture number="1" name="haskell.pattern.view.bracket" />
1240− </starts-with>
1241− <ends-with>
1242− <expression>(\))</expression>
1243− <capture number="1" name="haskell.pattern.view.bracket" />
1244− </ends-with>
1245− <subscopes anchored="true">
1246− <include syntax="self" collection="expressions" />
1247− <scope name="haskell.pattern.view.operator.arrow">
1248− <expression>-></expression>
1249− </scope>
1250− <include syntax="self" collection="pattern-match" />
1251− </subscopes>
1252− </scope>
1253− </collection>
1254−
1255− <collection name="tuple-match">
1256− <symbol type="expression" />
1257− <scope name="haskell.pattern.tuple">
1258− <starts-with>
1259− <expression>(\()</expression>
1260− <capture number="1" name="haskell.pattern.tuple.bracket" />
1261− </starts-with>
1262− <ends-with>
1263− <expression>(\))</expression>
1264− <capture number="1" name="haskell.pattern.tuple.bracket" />
1265− </ends-with>
1266− <subscopes>
1267− <include syntax="self" collection="pattern-match" />
1268− </subscopes>
1269− </scope>
1270− </collection>
1271−
1272− <collection name="case-expression">
1273− <scope name="haskell.case">
1274− <starts-with>
1275− <expression>(case)</expression>
1276− <capture number="1" name="haskell.case.keyword.condition" />
1277− </starts-with>
1278− <ends-with>
1279− <expression>(of)</expression>
1280− <capture number="1" name="haskell.case.keyword.condition" />
1281− </ends-with>
1282− <subscopes anchored="true">
1283− <include syntax="self" collection="pattern-match" />
1284− </subscopes>
1285− </scope>
1286− </collection>
1287−
1288− <collection name="case-match">
1289− <scope name="case-match">
1290− <starts-with>
1291− <expression>(?=((\h*)\S.*->($|\h)))</expression>
1292− </starts-with>
1293− <ends-with>
1294− <expression>-></expression>
1295− </ends-with>
1296− <subscopes anchored="true">
1297− <include syntax="self" collection="pattern-match" />
1298− </subscopes>
1299− </scope>
1300− </collection>
1301−
1302− <collection name="inner-case-expressions">
1303− <scope name="inner-case-expressions">
1304− <starts-with>
1305− <expression>(?=((\h*)\S.*->($|\h)))</expression>
1306− </starts-with>
1307− <ends-with>
1308− <template>^(?!\1)(?!\2\h)(?!\s*$)</template>
1309− </ends-with>
1310− <subscopes>
1311− <include syntax="self" collection="case-match" />
1312− <include syntax="self" collection="expressions" />
1313− </subscopes>
1314− </scope>
1315− </collection>
1316−
1317− <collection name="outer-case-expression">
1318− <scope name="outer-case-expression">
1319− <starts-with>
1320− <expression>(?=case)</expression>
1321− </starts-with>
1322− <ends-with />
1323− <subscopes anchored="true" skip-whitespace="false">
1324− <include syntax="self" collection="case-expression" />
1325− <include syntax="self" collection="inner-case-expressions" repeat="true" />
1326− </subscopes>
1327− </scope>
1328− </collection>
1329−
1330− <collection name="tuple">
1331− <symbol type="expression" />
1332− <scope name="haskell.tuple">
1333− <starts-with>
1334− <expression>(\()</expression>
1335− <capture number="1" name="haskell.tuple.bracket" />
1336− </starts-with>
1337− <ends-with>
1338− <expression>(\))</expression>
1339− <capture number="1" name="haskell.tuple.bracket" />
1340− </ends-with>
1341− <subscopes>
1342− <include syntax="self" collection="expressions" />
1343− </subscopes>
1344− </scope>
1345− </collection>
1346−
1347− <collection name="typeclass">
1348− <symbol type="interface" />
1349− <scope name="haskell.definition.class">
1350− <starts-with>
1351− <expression>^(\h*)(class)($|\h)</expression>
1352− <capture number="2" name="haskell.keyword.construct.class" />
1353− </starts-with>
1354− <ends-with>
1355− <template>^(?!\s+\1\S)(?!\s*$)</template>
1356− </ends-with>
1357− <subscopes>
1358− <scope name="haskell.keyword.construct.where">
1359− <expression>where</expression>
1360− </scope>
1361− <include syntax="self" collection="type" />
1362− <include syntax="self" collection="type-definition" />
1363− <!-- <include syntax="self" collection="type-annotation" /> -->
1364− <include syntax="self" collection="definition" />
1365− </subscopes>
1366− </scope>
1367− </collection>
1368−
1369− <collection name="instance">
1370− <scope name="haskell.instance">
1371− <symbol type="category" />
1372− <starts-with>
1373− <expression>^(\h*)(instance)($|\h)</expression>
1374− <capture number="2" name="haskell.keyword.construct.instance" />
1375− </starts-with>
1376− <ends-with>
1377− <template>^(?!\s+\1\S)(?!\s*$)</template>
1378− </ends-with>
1379− <subscopes>
1380− <scope name="haskell.keyword.construct.where">
1381− <expression>where</expression>
1382− </scope>
1383− <include syntax="self" collection="type" />
1384− <include syntax="self" collection="type-definition" />
1385− <include syntax="self" collection="type-annotation" />
1386− <include syntax="self" collection="definition" />
1387− </subscopes>
1388− </scope>
1389− </collection>
1390−
1391− <collection name="type-family-definition">
1392− <scope name="haskell.definition.type-family.type">
1393− <symbol type="type">
1394− <context behavior="subtree" foldable="false" />
1395− </symbol>
1396− <starts-with>
1397− <expression>^(\h*)(type\h+family)</expression>
1398− <capture number="2" name="haskell.keyword.construct.type-family" />
1399− </starts-with>
1400− <ends-with>
1401− <template>^(?!\s+\1\S)(?!\s*$)</template>
1402− </ends-with>
1403− <subscopes anchored="true" skip-whitespace="false">
1404− <scope name="haskell.type-family.head">
1405− <starts-with>
1406− <expression></expression>
1407− </starts-with>
1408− <ends-with>
1409− <expression>where</expression>
1410− <capture number="0" name="haskell.keyword.construct.where" />
1411− </ends-with>
1412− <subscopes anchored="true">
1413− <scope name="haskell.identifier.type-family.type.name">
1414− <expression>\S+</expression>
1415− </scope>
1416− <include syntax="self" collection="type" repeat="true" optional="true" />
1417− </subscopes>
1418− </scope>
1419−
1420− <include syntax="self" collection="type-family-case-definition" optional="true" repeat="true" />
1421− </subscopes>
1422− </scope>
1423− </collection>
1424−
1425− <collection name="type-family-case-definition">
1426− <scope name="haskell.definition.type-family.type.case">
1427− <starts-with>
1428− <expression>^(\h*)(?=\S)</expression>
1429− </starts-with>
1430− <ends-with>
1431− <template>^(?!\s+\1\S)(?!\s*$)</template>
1432− </ends-with>
1433− <subscopes>
1434− <include syntax="self" collection="type" optional="true" repeat="true" />
1435− <scope>
1436− <expression>=</expression>
1437− </scope>
1438− <include syntax="self" collection="type" optional="true" repeat="true" />
1439− </subscopes>
1440− </scope>
1441− </collection>
1442−
1443− <collection name="definition">
1444− <scope name="haskell.definition.type.function">
1445− <symbol type="function">
1446− <display-name>
1447− <component selector="haskell.definition.type.function" />
1448− </display-name>
1449−
1450− </symbol>
1451− <starts-with>
1452− <expression>^(?=(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h))</expression>
1453− <capture number="2" name="haskell.keyword.construct.default" />
1454− <capture number="3" name="haskell.identifier.function" />
1455− </starts-with>
1456− <ends-with>
1457− <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
1458− </ends-with>
1459− <subscopes>
1460− <include syntax="self" collection="type-annotation" />
1461− <include syntax="self" collection="implementation" />
1462− </subscopes>
1463− </scope>
1464− </collection>
1465−
1466− <collection name="do-bind">
1467− <scope name="do-bind">
1468− <starts-with>
1469− <expression>^(?=((\h*)\S.+<-($|\h)))</expression>
1470− </starts-with>
1471− <ends-with>
1472− <template>^(?!\1)(?!\2\h)(?!\s*$)</template>
1473− </ends-with>
1474− <subscopes>
1475− <include syntax="self" collection="do-pattern" />
1476− <include syntax="self" collection="expressions" />
1477− <!-- <scope name="bind-arrow">
1478− <expression><-</expression>
1479− </scope> -->
1480− </subscopes>
1481− </scope>
1482− </collection>
1483−
1484− <collection name="do-pattern">
1485− <scope name="do-pattern">
1486− <starts-with>
1487− <expression>^(?=((\h*)\S.+<-($|\h)))</expression>
1488− </starts-with>
1489− <ends-with>
1490− <expression><-</expression>
1491− </ends-with>
1492− <subscopes>
1493− <include syntax="self" collection="pattern-match" />
1494− <!-- <scope name="bind-arrow">
1495− <expression><-</expression>
1496− </scope>
1497− <include syntax="self" collection="expressions" repeat="true" /> -->
1498− </subscopes>
1499− </scope>
1500− </collection>
1501−
1502− <collection name="implementation">
1503− <scope name="haskell.definition.type.function">
1504− <local scope="within-construct" />
1505− <starts-with>
1506− <expression>^(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h)</expression>
1507− <capture number="2" name="haskell.keyword.construct.default" />
1508− <capture number="3" name="haskell.identifier.function" />
1509− </starts-with>
1510− <ends-with>
1511− <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
1512− </ends-with>
1513− <subscopes>
1514− <include syntax="self" collection="where-clause" />
1515− <include syntax="self" collection="expressions" />
1516− </subscopes>
1517− </scope>
1518− </collection>
1519−
1520− <collection name="type-annotation">
1521− <scope name="haskell.definition.type.function">
1522− <starts-with>
1523− <expression>^(\h*)`?(\w(\w|')*)`?\h*::($|\h)</expression>
1524− <capture number="2" name="haskell.identifier.function" />
1525− </starts-with>
1526− <ends-with>
1527− <template>^(?!\s+\1\S)(?!\s*$)</template>
1528− </ends-with>
1529− <subscopes>
1530− <include syntax="self" collection="type" />
1531− </subscopes>
1532− </scope>
1533− </collection>
1534−
1535− <collection name="type-definition">
1536− <scope name="haskell.definition.type">
1537− <starts-with>
1538− <expression>^(\h*)(type)\h+(\w(\w|')*)</expression>
1539− <capture number="2" name="haskell.keyword.construct.type" />
1540− <capture number="3" name="haskell.identifier.type" />
1541− </starts-with>
1542− <ends-with>
1543− <template>^(?!\s+\1\S)(?!\s*$)</template>
1544− </ends-with>
1545− <subscopes>
1546− <include syntax="self" collection="type" />
1547− </subscopes>
1548− </scope>
1549− </collection>
1550−
1551− <collection name="GADT-definition">
1552− <scope name="haskell.definition.struct.GADT">
1553− <symbol type="struct">
1554− <context behavior="subtree" foldable="false" />
1555− </symbol>
1556− <starts-with>
1557− <expression>^(\h*)(data|newtype)\h+(\w(\w|')*)</expression>
1558− <capture number="2" name="haskell.keyword.construct.data.GADT" />
1559− <capture number="3" name="haskell.identifier.data.type.name" />
1560− </starts-with>
1561− <ends-with>
1562− <template>^(?!\s+\1\S)(?!\s*$)</template>
1563− </ends-with>
1564− <subscopes>
1565− <scope name="haskell.keyword.construct.where">
1566− <expression>where</expression>
1567− </scope>
1568−
1569− <include syntax="self" collection="deriving-clause" />
1570− <include syntax="self" collection="record-definition" />
1571− <include syntax="self" collection="gadt-constructor" />
1572− <include syntax="self" collection="type" />
1573− </subscopes>
1574− </scope>
1575− </collection>
1576−
1577− <collection name="gadt-constructor">
1578− <scope name="haskell.identifier.type.struct.data.constructor">
1579− <symbol type="constructor">
1580− <context behavior="whitespace" />
1581− </symbol>
1582− <expression>(^|=|\|)\h+([A-Z](\w|')*)</expression>
1583− <capture number="2" name="haskell.identifier.data.name" />
1584− </scope>
1585− <scope name="identifier.type.struct.GADT.constructor">
1586− <symbol type="constructor"></symbol>
1587− <expression>^\h+([A-Z](\w|')*)</expression>
1588− <capture number="1" name="haskell.identifier.data.name" />
1589− </scope>
1590− </collection>
1591−
1592− <collection name="deriving-clause">
1593− <scope name="haskell.record.construct.deriving.keyword">
1594− <expression>deriving\h+(newtype|stock|anyclass)</expression>
1595− </scope>
1596− </collection>
1597−
1598− <collection name="record-definition">
1599− <scope name="haskell.record">
1600− <symbol>
1601− <context behavior="subtree" foldable="true" />
1602− </symbol>
1603− <starts-with>
1604− <expression>(?=\{)</expression>
1605− <capture number="0" name="haskell.record.bracket" />
1606− </starts-with>
1607− <ends-with>
1608− <expression>(\})</expression>
1609− <capture number="1" name="haskell.record.bracket" />
1610− </ends-with>
1611− <subscopes>
1612− <include syntax="self" collection="record-definition-field-name" />
1613− <include syntax="self" collection="type" />
1614− </subscopes>
1615− </scope>
1616− </collection>
1617−
1618− <collection name="record-definition-field-name">
1619− <scope name="haskell.record.definition.property">
1620− <symbol type="property" />
1621− <expression>(((?![A-Z])\w(\w|')*)\h*::|(^|\{|,)\h*((?![A-Z])\w(\w|')*))</expression>
1622− <capture number="5" name="haskell.record.definition.property.field.property.name" />
1623− <capture number="2" name="haskell.record.definition.property.field.property.name" />
1624− </scope>
1625− </collection>
1626−
1627− <collection name="type">
1628− <scope name="haskell.type.construct.tuple">
1629− <starts-with>
1630− <expression>\(</expression>
1631− </starts-with>
1632− <ends-with>
1633− <expression>\)</expression>
1634− </ends-with>
1635− <subscopes>
1636− <scope name="haskell.construct.type.typle.comma">
1637− <expression>\,</expression>
1638− </scope>
1639− <include syntax="self" collection="type" />
1640− </subscopes>
1641− </scope>
1642− <scope name="haskell.type.list">
1643− <starts-with>
1644− <expression>'?\[</expression>
1645− </starts-with>
1646− <ends-with>
1647− <expression>\]</expression>
1648− </ends-with>
1649− <subscopes>
1650− <include syntax="self" collection="type" />
1651− </subscopes>
1652− </scope>
1653− <scope name="haskell.type.star">
1654− <expression>\*</expression>
1655− </scope>
1656− <scope name="haskell.keyword.construct.type-annotation-operator">
1657− <expression>::</expression>
1658− </scope>
1659− <include syntax="self" collection="type-list" />
1660− <scope>
1661− <expression>(([A-Z](\w|')*\.)*)'*([A-Z](\w|')*)</expression>
1662− <capture number="1" name="haskell.identifier.package.module" />
1663− <capture number="4" name="haskell.identifier.type" />
1664− </scope>
1665− <scope name="haskell.keyword.construct.forall">
1666− <expression>forall</expression>
1667− </scope>
1668− <scope name="haskell.identifier.type.variable">
1669− <expression>(?!=)((?!(\(|\)|\,))\S)((?!(\(|\)|\,))\S)*</expression>
1670− </scope>
1671− <scope name="haskell.keyword.construct.function-arrow">
1672− <expression>-></expression>
1673− </scope>
1674− <scope name="haskell.keyword.construct.fat-arrow">
1675− <expression>=></expression>
1676− </scope>
1677− </collection>
1678−
1679− <collection name="pattern-definition">
1680− <scope name="haskell.pattern">
1681− <starts-with>
1682− <expression>^(\h*)(pattern)\h+(\w(\w|')*)</expression>
1683− <capture number="2" name="haskell.keyword.construct.pattern" />
1684− <capture number="3" name="haskell.identifier.decorator.pattern" />
1685− </starts-with>
1686− <ends-with>
1687− <template>^(?!\s+\1\S)(?!\s*$)</template>
1688− </ends-with>
1689− <subscopes>
1690− <scope name="haskell.keyword.construct.where">
1691− <expression>where</expression>
1692− </scope>
1693− <include syntax="self" collection="expressions" />
1694− </subscopes>
1695− </scope>
1696− </collection>
1697−
1698− <collection name="type-list">
1699− <scope name="haskell.type-list">
1700− <starts-with>
1701− <expression>('\[)</expression>
1702− <capture number="1" name="haskell.type-list.bracket" />
1703− </starts-with>
1704− <ends-with>
1705− <expression>(\])</expression>
1706− <capture number="1" name="haskell.type-list.bracket" />
1707− </ends-with>
1708− <subscopes>
1709− <include syntax="self" collection="type" />
1710− </subscopes>
1711− </scope>
1712− </collection>
1713−
1714− <collection name="lambda-head">
1715− <scope name="haskell.lambda">
1716− <starts-with>
1717− <expression>(\\)</expression>
1718− <capture number="1" name="haskell.keyword.construct.lambda" />
1719− </starts-with>
1720− <ends-with>
1721− <expression>(->)</expression>
1722− <capture number="1" name="haskell.keyword.construct.lambda" />
1723− </ends-with>
1724− <subscopes>
1725− <include syntax="self" collection="pattern-match" />
1726− </subscopes>
1727− </scope>
1728− </collection>
1729−
1730− <collection name="lambda-case">
1731− <scope name="haskell.keyword.condition.lambda-case">
1732− <expression>\\case</expression>
1733− </scope>
1734− </collection>
1735−
1736− <collection name="where-clause">
1737− <scope name="haskell.construct.where">
1738− <local scope="within-parent" />
1739− <starts-with>
1740− <expression>^(\h*)(where)</expression>
1741− <capture number="2" name="haskell.construct.keyword.where" />
1742− </starts-with>
1743− <ends-with>
1744− <template>^(?!\1\s*\S)(?!s*$)</template>
1745− </ends-with>
1746− <subscopes>
1747− <include syntax="self" collection="definition" />
1748− </subscopes>
1749− </scope>
1750− </collection>
1751−
1752−
1753− <collection name="qvarid">
1754− <scope name="haskell.identifier.function">
1755− <expression>(([A-Z](\w|')*\.)*)(\w(\w|')*)</expression>
1756− <capture number="1" name="haskell.identifier.package.module" />
1757− <capture number="4" name="haskell.identifier.type" />
1758− </scope>
1759− </collection>
1760−
1761− <collection name="varid">
1762− <scope name="haskell.identifier.variable">
1763− <expression>\w(\w|')*</expression>
1764− </scope>
1765− </collection>
1766−
1767− <collection name="qconid">
1768− <scope name="haskell.identifier.type.struct.constructor">
1769− <expression>([A-Z](\w|')*\.)*[A-Z](\w|')*</expression>
1770− </scope>
1771− </collection>
1772−
1773− <collection name="qconsym">
1774− <scope name="haskell.identifier.decorator.pattern">
1775− <expression>([A-Z](\w|')*\.):(\w|')*</expression>
1776− </scope>
1777− </collection>
1778−
1779− <collection name="literal">
1780− <include syntax="self" collection="number" />
1781− <include syntax="self" collection="strings" />
1782− </collection>
1783−
1784−
1785− <collection name="strings">
1786− <scope name="haskell.string.double-quoted">
1787− <starts-with>
1788− <expression>"</expression>
1789− </starts-with>
1790− <ends-with>
1791− <expression>"</expression>
1792− </ends-with>
1793− <subscopes>
1794− <scope name="haskell.string.escape-sequences">
1795− <expression>\\.</expression>
1796− </scope>
1797− </subscopes>
1798− </scope>
1799− <scope name="haskell.string.single-quoted">
1800− <expression>'([^'\\]|\\.)'</expression>
1801− </scope>
1802− </collection>
1803−
1804−
1805− <collection name="number">
1806− <scope name="haskell.value.number">
1807− <expression>(0x|0o|0O|0X)?\d+(\d|_)*(\.[\d|_]+)?((e|E)(\+|-)?\d+)?</expression>
1808− </scope>
1809− </collection>
1810−
1811−
1812− <collection name="module">
1813− <scope name="haskell.definition.module.package">
1814− <symbol type="package">
1815− <context behavior="subtree" foldable="true" export-local="true" />
1816− </symbol>
1817− <starts-with>
1818− <expression>^(module)\s+((\w|\.)+)</expression>
1819− <capture number="1" name="haskell.construct.keyword.module" />
1820− <capture number="2" name="haskell.definition.module.package" />
1821− </starts-with>
1822− <ends-with>
1823− <expression>(where)</expression>
1824− <capture number="1" name="haskell.construct.keyword.module" />
1825− </ends-with>
1826− <subscopes>
1827− <scope name="identifier.haskell.type">
1828− <symbol type="expression" />
1829− <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
1830− <capture number="1" name="identifier.type" />
1831− </scope>
1832− <scope name="identifier.variable">
1833− <symbol type="expression" />
1834− <expression>(\w|')+</expression>
1835− <capture number="0" name="identifier.haskell.function" />
1836− </scope>
1837− </subscopes>
1838− </scope>
1839− </collection>
1840−
1841− <collection name="import">
1842− <scope name="haskell.construct.import">
1843− <starts-with>
1844− <expression>^(import)\s</expression>
1845− <capture number="1" name="haskell.construct.keyword.import" />
1846− </starts-with>
1847− <ends-with>
1848− <expression>(?=^\S)</expression>
1849− </ends-with>
1850− <subscopes>
1851− <scope name="haskell.construct.qualified">
1852− <expression>qualified</expression>
1853− <capture number="0" name="haskell.construct.keyword.qualified" />
1854− </scope>
1855−
1856− <scope name="haskell.construct.hiding">
1857− <symbol type="keyword">
1858− <context behavior="subtree" />
1859− </symbol>
1860− <starts-with>
1861− <expression>(hiding)\h*(?=\()</expression>
1862− <capture number="1" name="haskell.construct.keyword.hiding" />
1863− </starts-with>
1864− <ends-with>
1865− <expression>(?=\))</expression>
1866− </ends-with>
1867− <subscopes anchored="true">
1868− <include syntax="self" collection="import-list" />
1869− </subscopes>
1870− </scope>
1871−
1872− <scope name="haskell.construct.keyword.as">
1873− <symbol type="package" />
1874− <expression>as(\h+([A-Z]\w*))?</expression>
1875− <capture number="2" name="haskell.package.qualified.name" />
1876− </scope>
1877− <scope name="haskell.identifier.module.package">
1878− <symbol type="package" />
1879− <expression>([A-Z](\w|')*\.)*[A-Z](\w|')*</expression>
1880− <capture number="0" name="haskell.package.name" />
1881− </scope>
1882− <include syntax="self" collection="import-list" />
1883− </subscopes>
1884− </scope>
1885− </collection>
1886−
1887− <collection name="import-list">
1888− <scope name="import-list">
1889− <symbol>
1890− <context behavior="subtree" export-local="true" />
1891− </symbol>
1892− <starts-with>
1893− <expression>(\()</expression>
1894− <capture number="1" name="haskell.import-list.bracket" />
1895− </starts-with>
1896− <ends-with>
1897− <expression>(\))</expression>
1898− <capture number="1" name="haskell.import-list.bracket" />
1899− </ends-with>
1900− <subscopes>
1901− <scope name="haskell.identifier.struct">
1902− <symbol type="reference" scope="local" />
1903− <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
1904− <capture number="1" name="haskell.import-list.identifier.type.name" />
1905− </scope>
1906− <scope name="haskell.identifier.function">
1907− <symbol type="reference" scope="local" />
1908− <expression>(\w|')+</expression>
1909− <capture number="0" name="haskell.import-list.function.name" />
1910− </scope>
1911− </subscopes>
1912− </scope>
1913− </collection>
1914−
1915− <!-- <collection name="special">
1916− <scope>
1917− <expression>(;|,)</expression>
1918− </scope>
1919− </collection> -->
1920−
1921−
1922− <collection name="reservedop">
1923− <scope name="keyword.operator">
1924− <expression>(\.\.|:|::|=|\\|\||<-|->|@|~|=>)</expression>
1925− </scope>
1926− </collection>
1927−
1928− <collection name="keywords">
1929− <scope name="haskell.keyword.modifier">
1930− <symbol type="keyword" />
1931− <strings>
1932− <string>do</string>
1933− <string>in</string>
1934− <string>infix</string>
1935− <string>infixl</string>
1936− <string>infixr</string>
1937− <string>where</string>
1938− <string>let</string>
1939− </strings>
1940− </scope>
1941− <scope name="haskell.keyword.condition">
1942− <symbol type="keyword" />
1943− <strings>
1944− <string>of</string>
1945− <string>case</string>
1946− <string>else</string>
1947− <string>if</string>
1948− <string>then</string>
1949− </strings>
1950− </scope>
1951− <scope name="haskell.keyword.keyword.construct">
1952− <symbol type="keyword" />
1953− <strings>
1954− <string>instance</string>
1955− <string>module</string>
1956− <string>type</string>
1957− <string>class</string>
1958− <string>data</string>
1959− <string>default</string>
1960− <string>deriving</string>
1961− <string>foreign</string>
1962− </strings>
1963− </scope>
1964− <scope name="haskell.keyword.self">
1965− <symbol type="keyword" />
1966− <strings>
1967− <string>undefined</string>
1968− <string>_</string>
1969− </strings>
1970− </scope>
1971− </collection>
1972−
1973− <collection name="comments">
1974− <scope name="haskell.comment.single" spell-check="true">
1975− <starts-with>
1976− <expression>--</expression>
1977− </starts-with>
1978− <ends-with>
1979− <expression>$</expression>
1980− </ends-with>
1981− </scope>
1982− <scope name="haskell.comment.block" spell-check="true">
1983− <starts-with>
1984− <expression>{-</expression>
1985− </starts-with>
1986− <ends-with>
1987− <expression>-}</expression>
1988− </ends-with>
1989− </scope>
1990− </collection>
1991−
1992−
1993997 </collections>
1994998</syntax>