Skip to content

Commit 343e64e

Browse files
sjakobimergify[bot]
authored andcommitted
Update reservedIdentifiers (#1473)
* Add `missing` and `assert` * Reformat them to match the grammar
1 parent 2a8735c commit 343e64e

File tree

1 file changed

+31
-23
lines changed

1 file changed

+31
-23
lines changed

dhall/src/Dhall/Syntax.hs

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,23 +1146,24 @@ shallowDenote e = e
11461146
reservedIdentifiers :: HashSet Text
11471147
reservedIdentifiers =
11481148
Data.HashSet.fromList
1149-
[ "let"
1150-
, "in"
1151-
, "Type"
1152-
, "Kind"
1153-
, "Sort"
1154-
, "forall"
1155-
, "Bool"
1156-
, "True"
1157-
, "False"
1158-
, "merge"
1159-
, "toMap"
1160-
, "if"
1149+
[ -- Keywords according to the `keyword` rule in the grammar
1150+
"if"
11611151
, "then"
11621152
, "else"
1163-
, "as"
1153+
, "let"
1154+
, "in"
11641155
, "using"
1165-
, "Natural"
1156+
, "missing"
1157+
, "as"
1158+
, "Infinity"
1159+
, "NaN"
1160+
, "merge"
1161+
, "Some"
1162+
, "toMap"
1163+
, "assert"
1164+
, "forall"
1165+
1166+
-- Builtins according to the `builtin` rule in the grammar
11661167
, "Natural/fold"
11671168
, "Natural/build"
11681169
, "Natural/isZero"
@@ -1176,23 +1177,30 @@ reservedIdentifiers =
11761177
, "Integer/negate"
11771178
, "Integer/show"
11781179
, "Integer/toDouble"
1179-
, "Double"
1180+
, "Integer/show"
1181+
, "Natural/subtract"
11801182
, "Double/show"
1181-
, "Text"
1182-
, "Text/show"
1183-
, "List"
11841183
, "List/build"
11851184
, "List/fold"
11861185
, "List/length"
11871186
, "List/head"
11881187
, "List/last"
11891188
, "List/indexed"
11901189
, "List/reverse"
1190+
, "Optional/fold"
1191+
, "Optional/build"
1192+
, "Text/show"
1193+
, "Bool"
1194+
, "True"
1195+
, "False"
11911196
, "Optional"
1192-
, "Some"
11931197
, "None"
1194-
, "Optional/build"
1195-
, "Optional/fold"
1196-
, "NaN"
1197-
, "Infinity"
1198+
, "Natural"
1199+
, "Integer"
1200+
, "Double"
1201+
, "Text"
1202+
, "List"
1203+
, "Type"
1204+
, "Kind"
1205+
, "Sort"
11981206
]

0 commit comments

Comments
 (0)