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