Support wild cards in TH splices
[ghc.git] / compiler / prelude / THNames.hs
1 -- %************************************************************************
2 -- %* *
3 -- The known-key names for Template Haskell
4 -- %* *
5 -- %************************************************************************
6
7 module THNames where
8
9 import PrelNames( mk_known_key_name )
10 import Module( Module, mkModuleNameFS, mkModule, thPackageKey )
11 import Name( Name )
12 import OccName( tcName, dataName, varName )
13 import Unique
14 import FastString
15
16 -- To add a name, do three things
17 --
18 -- 1) Allocate a key
19 -- 2) Make a "Name"
20 -- 3) Add the name to knownKeyNames
21
22 templateHaskellNames :: [Name]
23 -- The names that are implicitly mentioned by ``bracket''
24 -- Should stay in sync with the import list of DsMeta
25
26 templateHaskellNames = [
27 returnQName, bindQName, sequenceQName, newNameName, liftName,
28 mkNameName, mkNameG_vName, mkNameG_dName, mkNameG_tcName, mkNameLName,
29 liftStringName,
30 unTypeName,
31 unTypeQName,
32 unsafeTExpCoerceName,
33
34 -- Lit
35 charLName, stringLName, integerLName, intPrimLName, wordPrimLName,
36 floatPrimLName, doublePrimLName, rationalLName, stringPrimLName,
37 charPrimLName,
38 -- Pat
39 litPName, varPName, tupPName, unboxedTupPName,
40 conPName, tildePName, bangPName, infixPName,
41 asPName, wildPName, recPName, listPName, sigPName, viewPName,
42 -- FieldPat
43 fieldPatName,
44 -- Match
45 matchName,
46 -- Clause
47 clauseName,
48 -- Exp
49 varEName, conEName, litEName, appEName, infixEName,
50 infixAppName, sectionLName, sectionRName, lamEName, lamCaseEName,
51 tupEName, unboxedTupEName,
52 condEName, multiIfEName, letEName, caseEName, doEName, compEName,
53 fromEName, fromThenEName, fromToEName, fromThenToEName,
54 listEName, sigEName, recConEName, recUpdEName, staticEName,
55 -- FieldExp
56 fieldExpName,
57 -- Body
58 guardedBName, normalBName,
59 -- Guard
60 normalGEName, patGEName,
61 -- Stmt
62 bindSName, letSName, noBindSName, parSName,
63 -- Dec
64 funDName, valDName, dataDName, newtypeDName, tySynDName,
65 classDName, instanceDName, standaloneDerivDName, sigDName, forImpDName,
66 pragInlDName, pragSpecDName, pragSpecInlDName, pragSpecInstDName,
67 pragRuleDName, pragAnnDName, defaultSigDName,
68 familyNoKindDName, familyKindDName, dataInstDName, newtypeInstDName,
69 tySynInstDName, closedTypeFamilyKindDName, closedTypeFamilyNoKindDName,
70 infixLDName, infixRDName, infixNDName,
71 roleAnnotDName,
72 -- Cxt
73 cxtName,
74 -- Strict
75 isStrictName, notStrictName, unpackedName,
76 -- Con
77 normalCName, recCName, infixCName, forallCName,
78 -- StrictType
79 strictTypeName,
80 -- VarStrictType
81 varStrictTypeName,
82 -- Type
83 forallTName, varTName, conTName, appTName, equalityTName,
84 tupleTName, unboxedTupleTName, arrowTName, listTName, sigTName, litTName,
85 promotedTName, promotedTupleTName, promotedNilTName, promotedConsTName,
86 wildCardTName, namedWildCardTName,
87 -- TyLit
88 numTyLitName, strTyLitName,
89 -- TyVarBndr
90 plainTVName, kindedTVName,
91 -- Role
92 nominalRName, representationalRName, phantomRName, inferRName,
93 -- Kind
94 varKName, conKName, tupleKName, arrowKName, listKName, appKName,
95 starKName, constraintKName,
96 -- Callconv
97 cCallName, stdCallName, cApiCallName, primCallName, javaScriptCallName,
98 -- Safety
99 unsafeName,
100 safeName,
101 interruptibleName,
102 -- Inline
103 noInlineDataConName, inlineDataConName, inlinableDataConName,
104 -- RuleMatch
105 conLikeDataConName, funLikeDataConName,
106 -- Phases
107 allPhasesDataConName, fromPhaseDataConName, beforePhaseDataConName,
108 -- TExp
109 tExpDataConName,
110 -- RuleBndr
111 ruleVarName, typedRuleVarName,
112 -- FunDep
113 funDepName,
114 -- FamFlavour
115 typeFamName, dataFamName,
116 -- TySynEqn
117 tySynEqnName,
118 -- AnnTarget
119 valueAnnotationName, typeAnnotationName, moduleAnnotationName,
120
121 -- And the tycons
122 qTyConName, nameTyConName, patTyConName, fieldPatTyConName, matchQTyConName,
123 clauseQTyConName, expQTyConName, fieldExpTyConName, predTyConName,
124 stmtQTyConName, decQTyConName, conQTyConName, strictTypeQTyConName,
125 varStrictTypeQTyConName, typeQTyConName, expTyConName, decTyConName,
126 typeTyConName, tyVarBndrTyConName, matchTyConName, clauseTyConName,
127 patQTyConName, fieldPatQTyConName, fieldExpQTyConName, funDepTyConName,
128 predQTyConName, decsQTyConName, ruleBndrQTyConName, tySynEqnQTyConName,
129 roleTyConName, tExpTyConName,
130
131 -- Quasiquoting
132 quoteDecName, quoteTypeName, quoteExpName, quotePatName]
133
134 thSyn, thLib, qqLib :: Module
135 thSyn = mkTHModule (fsLit "Language.Haskell.TH.Syntax")
136 thLib = mkTHModule (fsLit "Language.Haskell.TH.Lib")
137 qqLib = mkTHModule (fsLit "Language.Haskell.TH.Quote")
138
139 mkTHModule :: FastString -> Module
140 mkTHModule m = mkModule thPackageKey (mkModuleNameFS m)
141
142 libFun, libTc, thFun, thTc, thCon, qqFun :: FastString -> Unique -> Name
143 libFun = mk_known_key_name OccName.varName thLib
144 libTc = mk_known_key_name OccName.tcName thLib
145 thFun = mk_known_key_name OccName.varName thSyn
146 thTc = mk_known_key_name OccName.tcName thSyn
147 thCon = mk_known_key_name OccName.dataName thSyn
148 qqFun = mk_known_key_name OccName.varName qqLib
149
150 -------------------- TH.Syntax -----------------------
151 qTyConName, nameTyConName, fieldExpTyConName, patTyConName,
152 fieldPatTyConName, expTyConName, decTyConName, typeTyConName,
153 tyVarBndrTyConName, matchTyConName, clauseTyConName, funDepTyConName,
154 predTyConName, tExpTyConName :: Name
155 qTyConName = thTc (fsLit "Q") qTyConKey
156 nameTyConName = thTc (fsLit "Name") nameTyConKey
157 fieldExpTyConName = thTc (fsLit "FieldExp") fieldExpTyConKey
158 patTyConName = thTc (fsLit "Pat") patTyConKey
159 fieldPatTyConName = thTc (fsLit "FieldPat") fieldPatTyConKey
160 expTyConName = thTc (fsLit "Exp") expTyConKey
161 decTyConName = thTc (fsLit "Dec") decTyConKey
162 typeTyConName = thTc (fsLit "Type") typeTyConKey
163 tyVarBndrTyConName= thTc (fsLit "TyVarBndr") tyVarBndrTyConKey
164 matchTyConName = thTc (fsLit "Match") matchTyConKey
165 clauseTyConName = thTc (fsLit "Clause") clauseTyConKey
166 funDepTyConName = thTc (fsLit "FunDep") funDepTyConKey
167 predTyConName = thTc (fsLit "Pred") predTyConKey
168 tExpTyConName = thTc (fsLit "TExp") tExpTyConKey
169
170 returnQName, bindQName, sequenceQName, newNameName, liftName,
171 mkNameName, mkNameG_vName, mkNameG_dName, mkNameG_tcName,
172 mkNameLName, liftStringName, unTypeName, unTypeQName,
173 unsafeTExpCoerceName :: Name
174 returnQName = thFun (fsLit "returnQ") returnQIdKey
175 bindQName = thFun (fsLit "bindQ") bindQIdKey
176 sequenceQName = thFun (fsLit "sequenceQ") sequenceQIdKey
177 newNameName = thFun (fsLit "newName") newNameIdKey
178 liftName = thFun (fsLit "lift") liftIdKey
179 liftStringName = thFun (fsLit "liftString") liftStringIdKey
180 mkNameName = thFun (fsLit "mkName") mkNameIdKey
181 mkNameG_vName = thFun (fsLit "mkNameG_v") mkNameG_vIdKey
182 mkNameG_dName = thFun (fsLit "mkNameG_d") mkNameG_dIdKey
183 mkNameG_tcName = thFun (fsLit "mkNameG_tc") mkNameG_tcIdKey
184 mkNameLName = thFun (fsLit "mkNameL") mkNameLIdKey
185 unTypeName = thFun (fsLit "unType") unTypeIdKey
186 unTypeQName = thFun (fsLit "unTypeQ") unTypeQIdKey
187 unsafeTExpCoerceName = thFun (fsLit "unsafeTExpCoerce") unsafeTExpCoerceIdKey
188
189
190 -------------------- TH.Lib -----------------------
191 -- data Lit = ...
192 charLName, stringLName, integerLName, intPrimLName, wordPrimLName,
193 floatPrimLName, doublePrimLName, rationalLName, stringPrimLName,
194 charPrimLName :: Name
195 charLName = libFun (fsLit "charL") charLIdKey
196 stringLName = libFun (fsLit "stringL") stringLIdKey
197 integerLName = libFun (fsLit "integerL") integerLIdKey
198 intPrimLName = libFun (fsLit "intPrimL") intPrimLIdKey
199 wordPrimLName = libFun (fsLit "wordPrimL") wordPrimLIdKey
200 floatPrimLName = libFun (fsLit "floatPrimL") floatPrimLIdKey
201 doublePrimLName = libFun (fsLit "doublePrimL") doublePrimLIdKey
202 rationalLName = libFun (fsLit "rationalL") rationalLIdKey
203 stringPrimLName = libFun (fsLit "stringPrimL") stringPrimLIdKey
204 charPrimLName = libFun (fsLit "charPrimL") charPrimLIdKey
205
206 -- data Pat = ...
207 litPName, varPName, tupPName, unboxedTupPName, conPName, infixPName, tildePName, bangPName,
208 asPName, wildPName, recPName, listPName, sigPName, viewPName :: Name
209 litPName = libFun (fsLit "litP") litPIdKey
210 varPName = libFun (fsLit "varP") varPIdKey
211 tupPName = libFun (fsLit "tupP") tupPIdKey
212 unboxedTupPName = libFun (fsLit "unboxedTupP") unboxedTupPIdKey
213 conPName = libFun (fsLit "conP") conPIdKey
214 infixPName = libFun (fsLit "infixP") infixPIdKey
215 tildePName = libFun (fsLit "tildeP") tildePIdKey
216 bangPName = libFun (fsLit "bangP") bangPIdKey
217 asPName = libFun (fsLit "asP") asPIdKey
218 wildPName = libFun (fsLit "wildP") wildPIdKey
219 recPName = libFun (fsLit "recP") recPIdKey
220 listPName = libFun (fsLit "listP") listPIdKey
221 sigPName = libFun (fsLit "sigP") sigPIdKey
222 viewPName = libFun (fsLit "viewP") viewPIdKey
223
224 -- type FieldPat = ...
225 fieldPatName :: Name
226 fieldPatName = libFun (fsLit "fieldPat") fieldPatIdKey
227
228 -- data Match = ...
229 matchName :: Name
230 matchName = libFun (fsLit "match") matchIdKey
231
232 -- data Clause = ...
233 clauseName :: Name
234 clauseName = libFun (fsLit "clause") clauseIdKey
235
236 -- data Exp = ...
237 varEName, conEName, litEName, appEName, infixEName, infixAppName,
238 sectionLName, sectionRName, lamEName, lamCaseEName, tupEName,
239 unboxedTupEName, condEName, multiIfEName, letEName, caseEName,
240 doEName, compEName, staticEName :: Name
241 varEName = libFun (fsLit "varE") varEIdKey
242 conEName = libFun (fsLit "conE") conEIdKey
243 litEName = libFun (fsLit "litE") litEIdKey
244 appEName = libFun (fsLit "appE") appEIdKey
245 infixEName = libFun (fsLit "infixE") infixEIdKey
246 infixAppName = libFun (fsLit "infixApp") infixAppIdKey
247 sectionLName = libFun (fsLit "sectionL") sectionLIdKey
248 sectionRName = libFun (fsLit "sectionR") sectionRIdKey
249 lamEName = libFun (fsLit "lamE") lamEIdKey
250 lamCaseEName = libFun (fsLit "lamCaseE") lamCaseEIdKey
251 tupEName = libFun (fsLit "tupE") tupEIdKey
252 unboxedTupEName = libFun (fsLit "unboxedTupE") unboxedTupEIdKey
253 condEName = libFun (fsLit "condE") condEIdKey
254 multiIfEName = libFun (fsLit "multiIfE") multiIfEIdKey
255 letEName = libFun (fsLit "letE") letEIdKey
256 caseEName = libFun (fsLit "caseE") caseEIdKey
257 doEName = libFun (fsLit "doE") doEIdKey
258 compEName = libFun (fsLit "compE") compEIdKey
259 -- ArithSeq skips a level
260 fromEName, fromThenEName, fromToEName, fromThenToEName :: Name
261 fromEName = libFun (fsLit "fromE") fromEIdKey
262 fromThenEName = libFun (fsLit "fromThenE") fromThenEIdKey
263 fromToEName = libFun (fsLit "fromToE") fromToEIdKey
264 fromThenToEName = libFun (fsLit "fromThenToE") fromThenToEIdKey
265 -- end ArithSeq
266 listEName, sigEName, recConEName, recUpdEName :: Name
267 listEName = libFun (fsLit "listE") listEIdKey
268 sigEName = libFun (fsLit "sigE") sigEIdKey
269 recConEName = libFun (fsLit "recConE") recConEIdKey
270 recUpdEName = libFun (fsLit "recUpdE") recUpdEIdKey
271 staticEName = libFun (fsLit "staticE") staticEIdKey
272
273 -- type FieldExp = ...
274 fieldExpName :: Name
275 fieldExpName = libFun (fsLit "fieldExp") fieldExpIdKey
276
277 -- data Body = ...
278 guardedBName, normalBName :: Name
279 guardedBName = libFun (fsLit "guardedB") guardedBIdKey
280 normalBName = libFun (fsLit "normalB") normalBIdKey
281
282 -- data Guard = ...
283 normalGEName, patGEName :: Name
284 normalGEName = libFun (fsLit "normalGE") normalGEIdKey
285 patGEName = libFun (fsLit "patGE") patGEIdKey
286
287 -- data Stmt = ...
288 bindSName, letSName, noBindSName, parSName :: Name
289 bindSName = libFun (fsLit "bindS") bindSIdKey
290 letSName = libFun (fsLit "letS") letSIdKey
291 noBindSName = libFun (fsLit "noBindS") noBindSIdKey
292 parSName = libFun (fsLit "parS") parSIdKey
293
294 -- data Dec = ...
295 funDName, valDName, dataDName, newtypeDName, tySynDName, classDName,
296 instanceDName, sigDName, forImpDName, pragInlDName, pragSpecDName,
297 pragSpecInlDName, pragSpecInstDName, pragRuleDName, pragAnnDName,
298 familyNoKindDName, standaloneDerivDName, defaultSigDName,
299 familyKindDName, dataInstDName, newtypeInstDName, tySynInstDName,
300 closedTypeFamilyKindDName, closedTypeFamilyNoKindDName,
301 infixLDName, infixRDName, infixNDName, roleAnnotDName :: Name
302 funDName = libFun (fsLit "funD") funDIdKey
303 valDName = libFun (fsLit "valD") valDIdKey
304 dataDName = libFun (fsLit "dataD") dataDIdKey
305 newtypeDName = libFun (fsLit "newtypeD") newtypeDIdKey
306 tySynDName = libFun (fsLit "tySynD") tySynDIdKey
307 classDName = libFun (fsLit "classD") classDIdKey
308 instanceDName = libFun (fsLit "instanceD") instanceDIdKey
309 standaloneDerivDName
310 = libFun (fsLit "standaloneDerivD") standaloneDerivDIdKey
311 sigDName = libFun (fsLit "sigD") sigDIdKey
312 defaultSigDName = libFun (fsLit "defaultSigD") defaultSigDIdKey
313 forImpDName = libFun (fsLit "forImpD") forImpDIdKey
314 pragInlDName = libFun (fsLit "pragInlD") pragInlDIdKey
315 pragSpecDName = libFun (fsLit "pragSpecD") pragSpecDIdKey
316 pragSpecInlDName = libFun (fsLit "pragSpecInlD") pragSpecInlDIdKey
317 pragSpecInstDName = libFun (fsLit "pragSpecInstD") pragSpecInstDIdKey
318 pragRuleDName = libFun (fsLit "pragRuleD") pragRuleDIdKey
319 pragAnnDName = libFun (fsLit "pragAnnD") pragAnnDIdKey
320 familyNoKindDName = libFun (fsLit "familyNoKindD") familyNoKindDIdKey
321 familyKindDName = libFun (fsLit "familyKindD") familyKindDIdKey
322 dataInstDName = libFun (fsLit "dataInstD") dataInstDIdKey
323 newtypeInstDName = libFun (fsLit "newtypeInstD") newtypeInstDIdKey
324 tySynInstDName = libFun (fsLit "tySynInstD") tySynInstDIdKey
325 closedTypeFamilyKindDName
326 = libFun (fsLit "closedTypeFamilyKindD") closedTypeFamilyKindDIdKey
327 closedTypeFamilyNoKindDName
328 = libFun (fsLit "closedTypeFamilyNoKindD") closedTypeFamilyNoKindDIdKey
329 infixLDName = libFun (fsLit "infixLD") infixLDIdKey
330 infixRDName = libFun (fsLit "infixRD") infixRDIdKey
331 infixNDName = libFun (fsLit "infixND") infixNDIdKey
332 roleAnnotDName = libFun (fsLit "roleAnnotD") roleAnnotDIdKey
333
334 -- type Ctxt = ...
335 cxtName :: Name
336 cxtName = libFun (fsLit "cxt") cxtIdKey
337
338 -- data Strict = ...
339 isStrictName, notStrictName, unpackedName :: Name
340 isStrictName = libFun (fsLit "isStrict") isStrictKey
341 notStrictName = libFun (fsLit "notStrict") notStrictKey
342 unpackedName = libFun (fsLit "unpacked") unpackedKey
343
344 -- data Con = ...
345 normalCName, recCName, infixCName, forallCName :: Name
346 normalCName = libFun (fsLit "normalC") normalCIdKey
347 recCName = libFun (fsLit "recC") recCIdKey
348 infixCName = libFun (fsLit "infixC") infixCIdKey
349 forallCName = libFun (fsLit "forallC") forallCIdKey
350
351 -- type StrictType = ...
352 strictTypeName :: Name
353 strictTypeName = libFun (fsLit "strictType") strictTKey
354
355 -- type VarStrictType = ...
356 varStrictTypeName :: Name
357 varStrictTypeName = libFun (fsLit "varStrictType") varStrictTKey
358
359 -- data Type = ...
360 forallTName, varTName, conTName, tupleTName, unboxedTupleTName, arrowTName,
361 listTName, appTName, sigTName, equalityTName, litTName,
362 promotedTName, promotedTupleTName,
363 promotedNilTName, promotedConsTName,
364 wildCardTName, namedWildCardTName :: Name
365 forallTName = libFun (fsLit "forallT") forallTIdKey
366 varTName = libFun (fsLit "varT") varTIdKey
367 conTName = libFun (fsLit "conT") conTIdKey
368 tupleTName = libFun (fsLit "tupleT") tupleTIdKey
369 unboxedTupleTName = libFun (fsLit "unboxedTupleT") unboxedTupleTIdKey
370 arrowTName = libFun (fsLit "arrowT") arrowTIdKey
371 listTName = libFun (fsLit "listT") listTIdKey
372 appTName = libFun (fsLit "appT") appTIdKey
373 sigTName = libFun (fsLit "sigT") sigTIdKey
374 equalityTName = libFun (fsLit "equalityT") equalityTIdKey
375 litTName = libFun (fsLit "litT") litTIdKey
376 promotedTName = libFun (fsLit "promotedT") promotedTIdKey
377 promotedTupleTName = libFun (fsLit "promotedTupleT") promotedTupleTIdKey
378 promotedNilTName = libFun (fsLit "promotedNilT") promotedNilTIdKey
379 promotedConsTName = libFun (fsLit "promotedConsT") promotedConsTIdKey
380 wildCardTName = libFun (fsLit "wildCardT") wildCardTIdKey
381 namedWildCardTName = libFun (fsLit "namedWildCardT") namedWildCardTIdKey
382
383
384 -- data TyLit = ...
385 numTyLitName, strTyLitName :: Name
386 numTyLitName = libFun (fsLit "numTyLit") numTyLitIdKey
387 strTyLitName = libFun (fsLit "strTyLit") strTyLitIdKey
388
389 -- data TyVarBndr = ...
390 plainTVName, kindedTVName :: Name
391 plainTVName = libFun (fsLit "plainTV") plainTVIdKey
392 kindedTVName = libFun (fsLit "kindedTV") kindedTVIdKey
393
394 -- data Role = ...
395 nominalRName, representationalRName, phantomRName, inferRName :: Name
396 nominalRName = libFun (fsLit "nominalR") nominalRIdKey
397 representationalRName = libFun (fsLit "representationalR") representationalRIdKey
398 phantomRName = libFun (fsLit "phantomR") phantomRIdKey
399 inferRName = libFun (fsLit "inferR") inferRIdKey
400
401 -- data Kind = ...
402 varKName, conKName, tupleKName, arrowKName, listKName, appKName,
403 starKName, constraintKName :: Name
404 varKName = libFun (fsLit "varK") varKIdKey
405 conKName = libFun (fsLit "conK") conKIdKey
406 tupleKName = libFun (fsLit "tupleK") tupleKIdKey
407 arrowKName = libFun (fsLit "arrowK") arrowKIdKey
408 listKName = libFun (fsLit "listK") listKIdKey
409 appKName = libFun (fsLit "appK") appKIdKey
410 starKName = libFun (fsLit "starK") starKIdKey
411 constraintKName = libFun (fsLit "constraintK") constraintKIdKey
412
413 -- data Callconv = ...
414 cCallName, stdCallName, cApiCallName, primCallName, javaScriptCallName :: Name
415 cCallName = libFun (fsLit "cCall") cCallIdKey
416 stdCallName = libFun (fsLit "stdCall") stdCallIdKey
417 cApiCallName = libFun (fsLit "cApi") cApiCallIdKey
418 primCallName = libFun (fsLit "prim") primCallIdKey
419 javaScriptCallName = libFun (fsLit "javaScript") javaScriptCallIdKey
420
421 -- data Safety = ...
422 unsafeName, safeName, interruptibleName :: Name
423 unsafeName = libFun (fsLit "unsafe") unsafeIdKey
424 safeName = libFun (fsLit "safe") safeIdKey
425 interruptibleName = libFun (fsLit "interruptible") interruptibleIdKey
426
427 -- data Inline = ...
428 noInlineDataConName, inlineDataConName, inlinableDataConName :: Name
429 noInlineDataConName = thCon (fsLit "NoInline") noInlineDataConKey
430 inlineDataConName = thCon (fsLit "Inline") inlineDataConKey
431 inlinableDataConName = thCon (fsLit "Inlinable") inlinableDataConKey
432
433 -- data RuleMatch = ...
434 conLikeDataConName, funLikeDataConName :: Name
435 conLikeDataConName = thCon (fsLit "ConLike") conLikeDataConKey
436 funLikeDataConName = thCon (fsLit "FunLike") funLikeDataConKey
437
438 -- data Phases = ...
439 allPhasesDataConName, fromPhaseDataConName, beforePhaseDataConName :: Name
440 allPhasesDataConName = thCon (fsLit "AllPhases") allPhasesDataConKey
441 fromPhaseDataConName = thCon (fsLit "FromPhase") fromPhaseDataConKey
442 beforePhaseDataConName = thCon (fsLit "BeforePhase") beforePhaseDataConKey
443
444 -- newtype TExp a = ...
445 tExpDataConName :: Name
446 tExpDataConName = thCon (fsLit "TExp") tExpDataConKey
447
448 -- data RuleBndr = ...
449 ruleVarName, typedRuleVarName :: Name
450 ruleVarName = libFun (fsLit ("ruleVar")) ruleVarIdKey
451 typedRuleVarName = libFun (fsLit ("typedRuleVar")) typedRuleVarIdKey
452
453 -- data FunDep = ...
454 funDepName :: Name
455 funDepName = libFun (fsLit "funDep") funDepIdKey
456
457 -- data FamFlavour = ...
458 typeFamName, dataFamName :: Name
459 typeFamName = libFun (fsLit "typeFam") typeFamIdKey
460 dataFamName = libFun (fsLit "dataFam") dataFamIdKey
461
462 -- data TySynEqn = ...
463 tySynEqnName :: Name
464 tySynEqnName = libFun (fsLit "tySynEqn") tySynEqnIdKey
465
466 -- data AnnTarget = ...
467 valueAnnotationName, typeAnnotationName, moduleAnnotationName :: Name
468 valueAnnotationName = libFun (fsLit "valueAnnotation") valueAnnotationIdKey
469 typeAnnotationName = libFun (fsLit "typeAnnotation") typeAnnotationIdKey
470 moduleAnnotationName = libFun (fsLit "moduleAnnotation") moduleAnnotationIdKey
471
472 matchQTyConName, clauseQTyConName, expQTyConName, stmtQTyConName,
473 decQTyConName, conQTyConName, strictTypeQTyConName,
474 varStrictTypeQTyConName, typeQTyConName, fieldExpQTyConName,
475 patQTyConName, fieldPatQTyConName, predQTyConName, decsQTyConName,
476 ruleBndrQTyConName, tySynEqnQTyConName, roleTyConName :: Name
477 matchQTyConName = libTc (fsLit "MatchQ") matchQTyConKey
478 clauseQTyConName = libTc (fsLit "ClauseQ") clauseQTyConKey
479 expQTyConName = libTc (fsLit "ExpQ") expQTyConKey
480 stmtQTyConName = libTc (fsLit "StmtQ") stmtQTyConKey
481 decQTyConName = libTc (fsLit "DecQ") decQTyConKey
482 decsQTyConName = libTc (fsLit "DecsQ") decsQTyConKey -- Q [Dec]
483 conQTyConName = libTc (fsLit "ConQ") conQTyConKey
484 strictTypeQTyConName = libTc (fsLit "StrictTypeQ") strictTypeQTyConKey
485 varStrictTypeQTyConName = libTc (fsLit "VarStrictTypeQ") varStrictTypeQTyConKey
486 typeQTyConName = libTc (fsLit "TypeQ") typeQTyConKey
487 fieldExpQTyConName = libTc (fsLit "FieldExpQ") fieldExpQTyConKey
488 patQTyConName = libTc (fsLit "PatQ") patQTyConKey
489 fieldPatQTyConName = libTc (fsLit "FieldPatQ") fieldPatQTyConKey
490 predQTyConName = libTc (fsLit "PredQ") predQTyConKey
491 ruleBndrQTyConName = libTc (fsLit "RuleBndrQ") ruleBndrQTyConKey
492 tySynEqnQTyConName = libTc (fsLit "TySynEqnQ") tySynEqnQTyConKey
493 roleTyConName = libTc (fsLit "Role") roleTyConKey
494
495 -- quasiquoting
496 quoteExpName, quotePatName, quoteDecName, quoteTypeName :: Name
497 quoteExpName = qqFun (fsLit "quoteExp") quoteExpKey
498 quotePatName = qqFun (fsLit "quotePat") quotePatKey
499 quoteDecName = qqFun (fsLit "quoteDec") quoteDecKey
500 quoteTypeName = qqFun (fsLit "quoteType") quoteTypeKey
501
502 -- TyConUniques available: 200-299
503 -- Check in PrelNames if you want to change this
504
505 expTyConKey, matchTyConKey, clauseTyConKey, qTyConKey, expQTyConKey,
506 decQTyConKey, patTyConKey, matchQTyConKey, clauseQTyConKey,
507 stmtQTyConKey, conQTyConKey, typeQTyConKey, typeTyConKey, tyVarBndrTyConKey,
508 decTyConKey, varStrictTypeQTyConKey, strictTypeQTyConKey,
509 fieldExpTyConKey, fieldPatTyConKey, nameTyConKey, patQTyConKey,
510 fieldPatQTyConKey, fieldExpQTyConKey, funDepTyConKey, predTyConKey,
511 predQTyConKey, decsQTyConKey, ruleBndrQTyConKey, tySynEqnQTyConKey,
512 roleTyConKey, tExpTyConKey :: Unique
513 expTyConKey = mkPreludeTyConUnique 200
514 matchTyConKey = mkPreludeTyConUnique 201
515 clauseTyConKey = mkPreludeTyConUnique 202
516 qTyConKey = mkPreludeTyConUnique 203
517 expQTyConKey = mkPreludeTyConUnique 204
518 decQTyConKey = mkPreludeTyConUnique 205
519 patTyConKey = mkPreludeTyConUnique 206
520 matchQTyConKey = mkPreludeTyConUnique 207
521 clauseQTyConKey = mkPreludeTyConUnique 208
522 stmtQTyConKey = mkPreludeTyConUnique 209
523 conQTyConKey = mkPreludeTyConUnique 210
524 typeQTyConKey = mkPreludeTyConUnique 211
525 typeTyConKey = mkPreludeTyConUnique 212
526 decTyConKey = mkPreludeTyConUnique 213
527 varStrictTypeQTyConKey = mkPreludeTyConUnique 214
528 strictTypeQTyConKey = mkPreludeTyConUnique 215
529 fieldExpTyConKey = mkPreludeTyConUnique 216
530 fieldPatTyConKey = mkPreludeTyConUnique 217
531 nameTyConKey = mkPreludeTyConUnique 218
532 patQTyConKey = mkPreludeTyConUnique 219
533 fieldPatQTyConKey = mkPreludeTyConUnique 220
534 fieldExpQTyConKey = mkPreludeTyConUnique 221
535 funDepTyConKey = mkPreludeTyConUnique 222
536 predTyConKey = mkPreludeTyConUnique 223
537 predQTyConKey = mkPreludeTyConUnique 224
538 tyVarBndrTyConKey = mkPreludeTyConUnique 225
539 decsQTyConKey = mkPreludeTyConUnique 226
540 ruleBndrQTyConKey = mkPreludeTyConUnique 227
541 tySynEqnQTyConKey = mkPreludeTyConUnique 228
542 roleTyConKey = mkPreludeTyConUnique 229
543 tExpTyConKey = mkPreludeTyConUnique 230
544
545 -- IdUniques available: 200-499
546 -- If you want to change this, make sure you check in PrelNames
547
548 returnQIdKey, bindQIdKey, sequenceQIdKey, liftIdKey, newNameIdKey,
549 mkNameIdKey, mkNameG_vIdKey, mkNameG_dIdKey, mkNameG_tcIdKey,
550 mkNameLIdKey, unTypeIdKey, unTypeQIdKey, unsafeTExpCoerceIdKey :: Unique
551 returnQIdKey = mkPreludeMiscIdUnique 200
552 bindQIdKey = mkPreludeMiscIdUnique 201
553 sequenceQIdKey = mkPreludeMiscIdUnique 202
554 liftIdKey = mkPreludeMiscIdUnique 203
555 newNameIdKey = mkPreludeMiscIdUnique 204
556 mkNameIdKey = mkPreludeMiscIdUnique 205
557 mkNameG_vIdKey = mkPreludeMiscIdUnique 206
558 mkNameG_dIdKey = mkPreludeMiscIdUnique 207
559 mkNameG_tcIdKey = mkPreludeMiscIdUnique 208
560 mkNameLIdKey = mkPreludeMiscIdUnique 209
561 unTypeIdKey = mkPreludeMiscIdUnique 210
562 unTypeQIdKey = mkPreludeMiscIdUnique 211
563 unsafeTExpCoerceIdKey = mkPreludeMiscIdUnique 212
564
565
566 -- data Lit = ...
567 charLIdKey, stringLIdKey, integerLIdKey, intPrimLIdKey, wordPrimLIdKey,
568 floatPrimLIdKey, doublePrimLIdKey, rationalLIdKey, stringPrimLIdKey,
569 charPrimLIdKey:: Unique
570 charLIdKey = mkPreludeMiscIdUnique 220
571 stringLIdKey = mkPreludeMiscIdUnique 221
572 integerLIdKey = mkPreludeMiscIdUnique 222
573 intPrimLIdKey = mkPreludeMiscIdUnique 223
574 wordPrimLIdKey = mkPreludeMiscIdUnique 224
575 floatPrimLIdKey = mkPreludeMiscIdUnique 225
576 doublePrimLIdKey = mkPreludeMiscIdUnique 226
577 rationalLIdKey = mkPreludeMiscIdUnique 227
578 stringPrimLIdKey = mkPreludeMiscIdUnique 228
579 charPrimLIdKey = mkPreludeMiscIdUnique 229
580
581 liftStringIdKey :: Unique
582 liftStringIdKey = mkPreludeMiscIdUnique 230
583
584 -- data Pat = ...
585 litPIdKey, varPIdKey, tupPIdKey, unboxedTupPIdKey, conPIdKey, infixPIdKey, tildePIdKey, bangPIdKey,
586 asPIdKey, wildPIdKey, recPIdKey, listPIdKey, sigPIdKey, viewPIdKey :: Unique
587 litPIdKey = mkPreludeMiscIdUnique 240
588 varPIdKey = mkPreludeMiscIdUnique 241
589 tupPIdKey = mkPreludeMiscIdUnique 242
590 unboxedTupPIdKey = mkPreludeMiscIdUnique 243
591 conPIdKey = mkPreludeMiscIdUnique 244
592 infixPIdKey = mkPreludeMiscIdUnique 245
593 tildePIdKey = mkPreludeMiscIdUnique 246
594 bangPIdKey = mkPreludeMiscIdUnique 247
595 asPIdKey = mkPreludeMiscIdUnique 248
596 wildPIdKey = mkPreludeMiscIdUnique 249
597 recPIdKey = mkPreludeMiscIdUnique 250
598 listPIdKey = mkPreludeMiscIdUnique 251
599 sigPIdKey = mkPreludeMiscIdUnique 252
600 viewPIdKey = mkPreludeMiscIdUnique 253
601
602 -- type FieldPat = ...
603 fieldPatIdKey :: Unique
604 fieldPatIdKey = mkPreludeMiscIdUnique 260
605
606 -- data Match = ...
607 matchIdKey :: Unique
608 matchIdKey = mkPreludeMiscIdUnique 261
609
610 -- data Clause = ...
611 clauseIdKey :: Unique
612 clauseIdKey = mkPreludeMiscIdUnique 262
613
614
615 -- data Exp = ...
616 varEIdKey, conEIdKey, litEIdKey, appEIdKey, infixEIdKey, infixAppIdKey,
617 sectionLIdKey, sectionRIdKey, lamEIdKey, lamCaseEIdKey, tupEIdKey,
618 unboxedTupEIdKey, condEIdKey, multiIfEIdKey,
619 letEIdKey, caseEIdKey, doEIdKey, compEIdKey,
620 fromEIdKey, fromThenEIdKey, fromToEIdKey, fromThenToEIdKey,
621 listEIdKey, sigEIdKey, recConEIdKey, recUpdEIdKey, staticEIdKey :: Unique
622 varEIdKey = mkPreludeMiscIdUnique 270
623 conEIdKey = mkPreludeMiscIdUnique 271
624 litEIdKey = mkPreludeMiscIdUnique 272
625 appEIdKey = mkPreludeMiscIdUnique 273
626 infixEIdKey = mkPreludeMiscIdUnique 274
627 infixAppIdKey = mkPreludeMiscIdUnique 275
628 sectionLIdKey = mkPreludeMiscIdUnique 276
629 sectionRIdKey = mkPreludeMiscIdUnique 277
630 lamEIdKey = mkPreludeMiscIdUnique 278
631 lamCaseEIdKey = mkPreludeMiscIdUnique 279
632 tupEIdKey = mkPreludeMiscIdUnique 280
633 unboxedTupEIdKey = mkPreludeMiscIdUnique 281
634 condEIdKey = mkPreludeMiscIdUnique 282
635 multiIfEIdKey = mkPreludeMiscIdUnique 283
636 letEIdKey = mkPreludeMiscIdUnique 284
637 caseEIdKey = mkPreludeMiscIdUnique 285
638 doEIdKey = mkPreludeMiscIdUnique 286
639 compEIdKey = mkPreludeMiscIdUnique 287
640 fromEIdKey = mkPreludeMiscIdUnique 288
641 fromThenEIdKey = mkPreludeMiscIdUnique 289
642 fromToEIdKey = mkPreludeMiscIdUnique 290
643 fromThenToEIdKey = mkPreludeMiscIdUnique 291
644 listEIdKey = mkPreludeMiscIdUnique 292
645 sigEIdKey = mkPreludeMiscIdUnique 293
646 recConEIdKey = mkPreludeMiscIdUnique 294
647 recUpdEIdKey = mkPreludeMiscIdUnique 295
648 staticEIdKey = mkPreludeMiscIdUnique 296
649
650 -- type FieldExp = ...
651 fieldExpIdKey :: Unique
652 fieldExpIdKey = mkPreludeMiscIdUnique 310
653
654 -- data Body = ...
655 guardedBIdKey, normalBIdKey :: Unique
656 guardedBIdKey = mkPreludeMiscIdUnique 311
657 normalBIdKey = mkPreludeMiscIdUnique 312
658
659 -- data Guard = ...
660 normalGEIdKey, patGEIdKey :: Unique
661 normalGEIdKey = mkPreludeMiscIdUnique 313
662 patGEIdKey = mkPreludeMiscIdUnique 314
663
664 -- data Stmt = ...
665 bindSIdKey, letSIdKey, noBindSIdKey, parSIdKey :: Unique
666 bindSIdKey = mkPreludeMiscIdUnique 320
667 letSIdKey = mkPreludeMiscIdUnique 321
668 noBindSIdKey = mkPreludeMiscIdUnique 322
669 parSIdKey = mkPreludeMiscIdUnique 323
670
671 -- data Dec = ...
672 funDIdKey, valDIdKey, dataDIdKey, newtypeDIdKey, tySynDIdKey,
673 classDIdKey, instanceDIdKey, sigDIdKey, forImpDIdKey, pragInlDIdKey,
674 pragSpecDIdKey, pragSpecInlDIdKey, pragSpecInstDIdKey, pragRuleDIdKey,
675 pragAnnDIdKey, familyNoKindDIdKey, familyKindDIdKey, defaultSigDIdKey,
676 dataInstDIdKey, newtypeInstDIdKey, tySynInstDIdKey, standaloneDerivDIdKey,
677 closedTypeFamilyKindDIdKey, closedTypeFamilyNoKindDIdKey,
678 infixLDIdKey, infixRDIdKey, infixNDIdKey, roleAnnotDIdKey :: Unique
679 funDIdKey = mkPreludeMiscIdUnique 330
680 valDIdKey = mkPreludeMiscIdUnique 331
681 dataDIdKey = mkPreludeMiscIdUnique 332
682 newtypeDIdKey = mkPreludeMiscIdUnique 333
683 tySynDIdKey = mkPreludeMiscIdUnique 334
684 classDIdKey = mkPreludeMiscIdUnique 335
685 instanceDIdKey = mkPreludeMiscIdUnique 336
686 sigDIdKey = mkPreludeMiscIdUnique 337
687 forImpDIdKey = mkPreludeMiscIdUnique 338
688 pragInlDIdKey = mkPreludeMiscIdUnique 339
689 pragSpecDIdKey = mkPreludeMiscIdUnique 340
690 pragSpecInlDIdKey = mkPreludeMiscIdUnique 341
691 pragSpecInstDIdKey = mkPreludeMiscIdUnique 342
692 pragRuleDIdKey = mkPreludeMiscIdUnique 343
693 pragAnnDIdKey = mkPreludeMiscIdUnique 344
694 familyNoKindDIdKey = mkPreludeMiscIdUnique 345
695 familyKindDIdKey = mkPreludeMiscIdUnique 346
696 dataInstDIdKey = mkPreludeMiscIdUnique 347
697 newtypeInstDIdKey = mkPreludeMiscIdUnique 348
698 tySynInstDIdKey = mkPreludeMiscIdUnique 349
699 closedTypeFamilyKindDIdKey = mkPreludeMiscIdUnique 350
700 closedTypeFamilyNoKindDIdKey = mkPreludeMiscIdUnique 351
701 infixLDIdKey = mkPreludeMiscIdUnique 352
702 infixRDIdKey = mkPreludeMiscIdUnique 353
703 infixNDIdKey = mkPreludeMiscIdUnique 354
704 roleAnnotDIdKey = mkPreludeMiscIdUnique 355
705 standaloneDerivDIdKey = mkPreludeMiscIdUnique 356
706 defaultSigDIdKey = mkPreludeMiscIdUnique 357
707
708 -- type Cxt = ...
709 cxtIdKey :: Unique
710 cxtIdKey = mkPreludeMiscIdUnique 360
711
712 -- data Strict = ...
713 isStrictKey, notStrictKey, unpackedKey :: Unique
714 isStrictKey = mkPreludeMiscIdUnique 363
715 notStrictKey = mkPreludeMiscIdUnique 364
716 unpackedKey = mkPreludeMiscIdUnique 365
717
718 -- data Con = ...
719 normalCIdKey, recCIdKey, infixCIdKey, forallCIdKey :: Unique
720 normalCIdKey = mkPreludeMiscIdUnique 370
721 recCIdKey = mkPreludeMiscIdUnique 371
722 infixCIdKey = mkPreludeMiscIdUnique 372
723 forallCIdKey = mkPreludeMiscIdUnique 373
724
725 -- type StrictType = ...
726 strictTKey :: Unique
727 strictTKey = mkPreludeMiscIdUnique 374
728
729 -- type VarStrictType = ...
730 varStrictTKey :: Unique
731 varStrictTKey = mkPreludeMiscIdUnique 375
732
733 -- data Type = ...
734 forallTIdKey, varTIdKey, conTIdKey, tupleTIdKey, unboxedTupleTIdKey, arrowTIdKey,
735 listTIdKey, appTIdKey, sigTIdKey, equalityTIdKey, litTIdKey,
736 promotedTIdKey, promotedTupleTIdKey,
737 promotedNilTIdKey, promotedConsTIdKey,
738 wildCardTIdKey, namedWildCardTIdKey :: Unique
739 forallTIdKey = mkPreludeMiscIdUnique 380
740 varTIdKey = mkPreludeMiscIdUnique 381
741 conTIdKey = mkPreludeMiscIdUnique 382
742 tupleTIdKey = mkPreludeMiscIdUnique 383
743 unboxedTupleTIdKey = mkPreludeMiscIdUnique 384
744 arrowTIdKey = mkPreludeMiscIdUnique 385
745 listTIdKey = mkPreludeMiscIdUnique 386
746 appTIdKey = mkPreludeMiscIdUnique 387
747 sigTIdKey = mkPreludeMiscIdUnique 388
748 equalityTIdKey = mkPreludeMiscIdUnique 389
749 litTIdKey = mkPreludeMiscIdUnique 390
750 promotedTIdKey = mkPreludeMiscIdUnique 391
751 promotedTupleTIdKey = mkPreludeMiscIdUnique 392
752 promotedNilTIdKey = mkPreludeMiscIdUnique 393
753 promotedConsTIdKey = mkPreludeMiscIdUnique 394
754 wildCardTIdKey = mkPreludeMiscIdUnique 395
755 namedWildCardTIdKey = mkPreludeMiscIdUnique 396
756
757 -- data TyLit = ...
758 numTyLitIdKey, strTyLitIdKey :: Unique
759 numTyLitIdKey = mkPreludeMiscIdUnique 400
760 strTyLitIdKey = mkPreludeMiscIdUnique 401
761
762 -- data TyVarBndr = ...
763 plainTVIdKey, kindedTVIdKey :: Unique
764 plainTVIdKey = mkPreludeMiscIdUnique 402
765 kindedTVIdKey = mkPreludeMiscIdUnique 403
766
767 -- data Role = ...
768 nominalRIdKey, representationalRIdKey, phantomRIdKey, inferRIdKey :: Unique
769 nominalRIdKey = mkPreludeMiscIdUnique 404
770 representationalRIdKey = mkPreludeMiscIdUnique 405
771 phantomRIdKey = mkPreludeMiscIdUnique 406
772 inferRIdKey = mkPreludeMiscIdUnique 407
773
774 -- data Kind = ...
775 varKIdKey, conKIdKey, tupleKIdKey, arrowKIdKey, listKIdKey, appKIdKey,
776 starKIdKey, constraintKIdKey :: Unique
777 varKIdKey = mkPreludeMiscIdUnique 408
778 conKIdKey = mkPreludeMiscIdUnique 409
779 tupleKIdKey = mkPreludeMiscIdUnique 410
780 arrowKIdKey = mkPreludeMiscIdUnique 411
781 listKIdKey = mkPreludeMiscIdUnique 412
782 appKIdKey = mkPreludeMiscIdUnique 413
783 starKIdKey = mkPreludeMiscIdUnique 414
784 constraintKIdKey = mkPreludeMiscIdUnique 415
785
786 -- data Callconv = ...
787 cCallIdKey, stdCallIdKey, cApiCallIdKey, primCallIdKey,
788 javaScriptCallIdKey :: Unique
789 cCallIdKey = mkPreludeMiscIdUnique 420
790 stdCallIdKey = mkPreludeMiscIdUnique 421
791 cApiCallIdKey = mkPreludeMiscIdUnique 422
792 primCallIdKey = mkPreludeMiscIdUnique 423
793 javaScriptCallIdKey = mkPreludeMiscIdUnique 424
794
795 -- data Safety = ...
796 unsafeIdKey, safeIdKey, interruptibleIdKey :: Unique
797 unsafeIdKey = mkPreludeMiscIdUnique 430
798 safeIdKey = mkPreludeMiscIdUnique 431
799 interruptibleIdKey = mkPreludeMiscIdUnique 432
800
801 -- data Inline = ...
802 noInlineDataConKey, inlineDataConKey, inlinableDataConKey :: Unique
803 noInlineDataConKey = mkPreludeDataConUnique 40
804 inlineDataConKey = mkPreludeDataConUnique 41
805 inlinableDataConKey = mkPreludeDataConUnique 42
806
807 -- data RuleMatch = ...
808 conLikeDataConKey, funLikeDataConKey :: Unique
809 conLikeDataConKey = mkPreludeDataConUnique 43
810 funLikeDataConKey = mkPreludeDataConUnique 44
811
812 -- data Phases = ...
813 allPhasesDataConKey, fromPhaseDataConKey, beforePhaseDataConKey :: Unique
814 allPhasesDataConKey = mkPreludeDataConUnique 45
815 fromPhaseDataConKey = mkPreludeDataConUnique 46
816 beforePhaseDataConKey = mkPreludeDataConUnique 47
817
818 -- newtype TExp a = ...
819 tExpDataConKey :: Unique
820 tExpDataConKey = mkPreludeDataConUnique 48
821
822 -- data FunDep = ...
823 funDepIdKey :: Unique
824 funDepIdKey = mkPreludeMiscIdUnique 440
825
826 -- data FamFlavour = ...
827 typeFamIdKey, dataFamIdKey :: Unique
828 typeFamIdKey = mkPreludeMiscIdUnique 450
829 dataFamIdKey = mkPreludeMiscIdUnique 451
830
831 -- data TySynEqn = ...
832 tySynEqnIdKey :: Unique
833 tySynEqnIdKey = mkPreludeMiscIdUnique 460
834
835 -- quasiquoting
836 quoteExpKey, quotePatKey, quoteDecKey, quoteTypeKey :: Unique
837 quoteExpKey = mkPreludeMiscIdUnique 470
838 quotePatKey = mkPreludeMiscIdUnique 471
839 quoteDecKey = mkPreludeMiscIdUnique 472
840 quoteTypeKey = mkPreludeMiscIdUnique 473
841
842 -- data RuleBndr = ...
843 ruleVarIdKey, typedRuleVarIdKey :: Unique
844 ruleVarIdKey = mkPreludeMiscIdUnique 480
845 typedRuleVarIdKey = mkPreludeMiscIdUnique 481
846
847 -- data AnnTarget = ...
848 valueAnnotationIdKey, typeAnnotationIdKey, moduleAnnotationIdKey :: Unique
849 valueAnnotationIdKey = mkPreludeMiscIdUnique 490
850 typeAnnotationIdKey = mkPreludeMiscIdUnique 491
851 moduleAnnotationIdKey = mkPreludeMiscIdUnique 492