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