THNames.hs 49.3 KB
Newer Older
1 2 3 4 5 6 7 8
-- %************************************************************************
-- %*                                                                   *
--              The known-key names for Template Haskell
-- %*                                                                   *
-- %************************************************************************

module THNames where

9 10
import GhcPrelude ()

11
import PrelNames( mk_known_key_name )
12
import Module( Module, mkModuleNameFS, mkModule, thUnitId )
13
import Name( Name )
Ryan Scott's avatar
Ryan Scott committed
14 15
import OccName( tcName, clsName, dataName, varName )
import RdrName( RdrName, nameRdrName )
16 17 18 19 20 21 22
import Unique
import FastString

-- To add a name, do three things
--
--  1) Allocate a key
--  2) Make a "Name"
Jan Stolarek's avatar
Jan Stolarek committed
23
--  3) Add the name to templateHaskellNames
24 25 26 27 28 29 30 31

templateHaskellNames :: [Name]
-- The names that are implicitly mentioned by ``bracket''
-- Should stay in sync with the import list of DsMeta

templateHaskellNames = [
    returnQName, bindQName, sequenceQName, newNameName, liftName,
    mkNameName, mkNameG_vName, mkNameG_dName, mkNameG_tcName, mkNameLName,
32
    mkNameSName,
33 34 35 36 37 38 39
    liftStringName,
    unTypeName,
    unTypeQName,
    unsafeTExpCoerceName,

    -- Lit
    charLName, stringLName, integerLName, intPrimLName, wordPrimLName,
40 41
    floatPrimLName, doublePrimLName, rationalLName, stringPrimLName,
    charPrimLName,
42
    -- Pat
43
    litPName, varPName, tupPName, unboxedTupPName, unboxedSumPName,
44 45 46 47 48 49 50 51 52
    conPName, tildePName, bangPName, infixPName,
    asPName, wildPName, recPName, listPName, sigPName, viewPName,
    -- FieldPat
    fieldPatName,
    -- Match
    matchName,
    -- Clause
    clauseName,
    -- Exp
53
    varEName, conEName, litEName, appEName, appTypeEName, infixEName,
54
    infixAppName, sectionLName, sectionRName, lamEName, lamCaseEName,
55
    tupEName, unboxedTupEName, unboxedSumEName,
56
    condEName, multiIfEName, letEName, caseEName, doEName, mdoEName, compEName,
57
    fromEName, fromThenEName, fromToEName, fromThenToEName,
58
    listEName, sigEName, recConEName, recUpdEName, staticEName, unboundVarEName,
59
    labelEName, implicitParamVarEName,
60 61 62 63 64 65 66
    -- FieldExp
    fieldExpName,
    -- Body
    guardedBName, normalBName,
    -- Guard
    normalGEName, patGEName,
    -- Stmt
67
    bindSName, letSName, noBindSName, parSName, recSName,
68 69
    -- Dec
    funDName, valDName, dataDName, newtypeDName, tySynDName,
70
    classDName, instanceWithOverlapDName,
Ryan Scott's avatar
Ryan Scott committed
71
    standaloneDerivWithStrategyDName, sigDName, forImpDName,
72
    pragInlDName, pragSpecDName, pragSpecInlDName, pragSpecInstDName,
73
    pragRuleDName, pragCompleteDName, pragAnnDName, defaultSigDName,
Jan Stolarek's avatar
Jan Stolarek committed
74 75
    dataFamilyDName, openTypeFamilyDName, closedTypeFamilyDName,
    dataInstDName, newtypeInstDName, tySynInstDName,
76
    infixLDName, infixRDName, infixNDName,
77
    roleAnnotDName, patSynDName, patSynSigDName,
78
    implicitParamBindDName,
79 80
    -- Cxt
    cxtName,
81

82 83 84 85
    -- SourceUnpackedness
    noSourceUnpackednessName, sourceNoUnpackName, sourceUnpackName,
    -- SourceStrictness
    noSourceStrictnessName, sourceLazyName, sourceStrictName,
86
    -- Con
87
    normalCName, recCName, infixCName, forallCName, gadtCName, recGadtCName,
88 89 90 91 92 93
    -- Bang
    bangName,
    -- BangType
    bangTypeName,
    -- VarBangType
    varBangTypeName,
94 95 96 97
    -- PatSynDir (for pattern synonyms)
    unidirPatSynName, implBidirPatSynName, explBidirPatSynName,
    -- PatSynArgs (for pattern synonyms)
    prefixPatSynName, infixPatSynName, recordPatSynName,
98
    -- Type
Ryan Scott's avatar
Ryan Scott committed
99 100 101
    forallTName, forallVisTName, varTName, conTName, infixTName, appTName,
    appKindTName, equalityTName, tupleTName, unboxedTupleTName,
    unboxedSumTName, arrowTName, listTName, sigTName, litTName,
102
    promotedTName, promotedTupleTName, promotedNilTName, promotedConsTName,
103
    wildCardTName, implicitParamTName,
104 105 106 107 108 109 110 111 112
    -- TyLit
    numTyLitName, strTyLitName,
    -- TyVarBndr
    plainTVName, kindedTVName,
    -- Role
    nominalRName, representationalRName, phantomRName, inferRName,
    -- Kind
    varKName, conKName, tupleKName, arrowKName, listKName, appKName,
    starKName, constraintKName,
Jan Stolarek's avatar
Jan Stolarek committed
113 114 115 116
    -- FamilyResultSig
    noSigName, kindSigName, tyVarSigName,
    -- InjectivityAnn
    injectivityAnnName,
117 118 119 120 121 122 123 124 125 126 127 128
    -- Callconv
    cCallName, stdCallName, cApiCallName, primCallName, javaScriptCallName,
    -- Safety
    unsafeName,
    safeName,
    interruptibleName,
    -- Inline
    noInlineDataConName, inlineDataConName, inlinableDataConName,
    -- RuleMatch
    conLikeDataConName, funLikeDataConName,
    -- Phases
    allPhasesDataConName, fromPhaseDataConName, beforePhaseDataConName,
129 130 131
    -- Overlap
    overlappableDataConName, overlappingDataConName, overlapsDataConName,
    incoherentDataConName,
Ryan Scott's avatar
Ryan Scott committed
132
    -- DerivStrategy
Ryan Scott's avatar
Ryan Scott committed
133 134
    stockStrategyName, anyclassStrategyName,
    newtypeStrategyName, viaStrategyName,
135 136 137 138 139 140 141 142 143 144
    -- TExp
    tExpDataConName,
    -- RuleBndr
    ruleVarName, typedRuleVarName,
    -- FunDep
    funDepName,
    -- TySynEqn
    tySynEqnName,
    -- AnnTarget
    valueAnnotationName, typeAnnotationName, moduleAnnotationName,
Ryan Scott's avatar
Ryan Scott committed
145 146
    -- DerivClause
    derivClauseName,
147

Ryan Scott's avatar
Ryan Scott committed
148 149 150
    -- The type classes
    liftClassName,

151 152 153
    -- And the tycons
    qTyConName, nameTyConName, patTyConName, fieldPatTyConName, matchQTyConName,
    clauseQTyConName, expQTyConName, fieldExpTyConName, predTyConName,
154 155
    stmtQTyConName, decQTyConName, conQTyConName, bangTypeQTyConName,
    varBangTypeQTyConName, typeQTyConName, expTyConName, decTyConName,
Ryan Scott's avatar
Ryan Scott committed
156
    typeTyConName, tyVarBndrQTyConName, matchTyConName, clauseTyConName,
157 158
    patQTyConName, fieldPatQTyConName, fieldExpQTyConName, funDepTyConName,
    predQTyConName, decsQTyConName, ruleBndrQTyConName, tySynEqnQTyConName,
Ryan Scott's avatar
Ryan Scott committed
159
    roleTyConName, tExpTyConName, injAnnTyConName, kindQTyConName,
Ryan Scott's avatar
Ryan Scott committed
160
    overlapTyConName, derivClauseQTyConName, derivStrategyQTyConName,
161 162 163 164 165 166

    -- Quasiquoting
    quoteDecName, quoteTypeName, quoteExpName, quotePatName]

thSyn, thLib, qqLib :: Module
thSyn = mkTHModule (fsLit "Language.Haskell.TH.Syntax")
Ryan Scott's avatar
Ryan Scott committed
167
thLib = mkTHModule (fsLit "Language.Haskell.TH.Lib.Internal")
168 169 170
qqLib = mkTHModule (fsLit "Language.Haskell.TH.Quote")

mkTHModule :: FastString -> Module
171
mkTHModule m = mkModule thUnitId (mkModuleNameFS m)
172

Ryan Scott's avatar
Ryan Scott committed
173
libFun, libTc, thFun, thTc, thCls, thCon, qqFun :: FastString -> Unique -> Name
174 175 176 177
libFun = mk_known_key_name OccName.varName  thLib
libTc  = mk_known_key_name OccName.tcName   thLib
thFun  = mk_known_key_name OccName.varName  thSyn
thTc   = mk_known_key_name OccName.tcName   thSyn
Ryan Scott's avatar
Ryan Scott committed
178
thCls  = mk_known_key_name OccName.clsName  thSyn
179 180 181 182
thCon  = mk_known_key_name OccName.dataName thSyn
qqFun  = mk_known_key_name OccName.varName  qqLib

-------------------- TH.Syntax -----------------------
Ryan Scott's avatar
Ryan Scott committed
183 184 185
liftClassName :: Name
liftClassName = thCls (fsLit "Lift") liftClassKey

186 187
qTyConName, nameTyConName, fieldExpTyConName, patTyConName,
    fieldPatTyConName, expTyConName, decTyConName, typeTyConName,
Ryan Scott's avatar
Ryan Scott committed
188
    matchTyConName, clauseTyConName, funDepTyConName, predTyConName,
Ryan Scott's avatar
Ryan Scott committed
189
    tExpTyConName, injAnnTyConName, overlapTyConName :: Name
Ryan Scott's avatar
Ryan Scott committed
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
qTyConName             = thTc (fsLit "Q")              qTyConKey
nameTyConName          = thTc (fsLit "Name")           nameTyConKey
fieldExpTyConName      = thTc (fsLit "FieldExp")       fieldExpTyConKey
patTyConName           = thTc (fsLit "Pat")            patTyConKey
fieldPatTyConName      = thTc (fsLit "FieldPat")       fieldPatTyConKey
expTyConName           = thTc (fsLit "Exp")            expTyConKey
decTyConName           = thTc (fsLit "Dec")            decTyConKey
typeTyConName          = thTc (fsLit "Type")           typeTyConKey
matchTyConName         = thTc (fsLit "Match")          matchTyConKey
clauseTyConName        = thTc (fsLit "Clause")         clauseTyConKey
funDepTyConName        = thTc (fsLit "FunDep")         funDepTyConKey
predTyConName          = thTc (fsLit "Pred")           predTyConKey
tExpTyConName          = thTc (fsLit "TExp")           tExpTyConKey
injAnnTyConName        = thTc (fsLit "InjectivityAnn") injAnnTyConKey
overlapTyConName       = thTc (fsLit "Overlap")        overlapTyConKey
205 206 207

returnQName, bindQName, sequenceQName, newNameName, liftName,
    mkNameName, mkNameG_vName, mkNameG_dName, mkNameG_tcName,
208
    mkNameLName, mkNameSName, liftStringName, unTypeName, unTypeQName,
209 210 211 212 213 214 215 216 217 218 219 220
    unsafeTExpCoerceName :: Name
returnQName    = thFun (fsLit "returnQ")   returnQIdKey
bindQName      = thFun (fsLit "bindQ")     bindQIdKey
sequenceQName  = thFun (fsLit "sequenceQ") sequenceQIdKey
newNameName    = thFun (fsLit "newName")   newNameIdKey
liftName       = thFun (fsLit "lift")      liftIdKey
liftStringName = thFun (fsLit "liftString")  liftStringIdKey
mkNameName     = thFun (fsLit "mkName")     mkNameIdKey
mkNameG_vName  = thFun (fsLit "mkNameG_v")  mkNameG_vIdKey
mkNameG_dName  = thFun (fsLit "mkNameG_d")  mkNameG_dIdKey
mkNameG_tcName = thFun (fsLit "mkNameG_tc") mkNameG_tcIdKey
mkNameLName    = thFun (fsLit "mkNameL")    mkNameLIdKey
221
mkNameSName    = thFun (fsLit "mkNameS")    mkNameSIdKey
222 223 224 225 226 227 228 229
unTypeName     = thFun (fsLit "unType")     unTypeIdKey
unTypeQName    = thFun (fsLit "unTypeQ")    unTypeQIdKey
unsafeTExpCoerceName = thFun (fsLit "unsafeTExpCoerce") unsafeTExpCoerceIdKey


-------------------- TH.Lib -----------------------
-- data Lit = ...
charLName, stringLName, integerLName, intPrimLName, wordPrimLName,
230 231
    floatPrimLName, doublePrimLName, rationalLName, stringPrimLName,
    charPrimLName :: Name
232 233 234 235 236 237 238 239
charLName       = libFun (fsLit "charL")       charLIdKey
stringLName     = libFun (fsLit "stringL")     stringLIdKey
integerLName    = libFun (fsLit "integerL")    integerLIdKey
intPrimLName    = libFun (fsLit "intPrimL")    intPrimLIdKey
wordPrimLName   = libFun (fsLit "wordPrimL")   wordPrimLIdKey
floatPrimLName  = libFun (fsLit "floatPrimL")  floatPrimLIdKey
doublePrimLName = libFun (fsLit "doublePrimL") doublePrimLIdKey
rationalLName   = libFun (fsLit "rationalL")     rationalLIdKey
240 241
stringPrimLName = libFun (fsLit "stringPrimL") stringPrimLIdKey
charPrimLName   = libFun (fsLit "charPrimL")   charPrimLIdKey
242 243

-- data Pat = ...
244 245 246
litPName, varPName, tupPName, unboxedTupPName, unboxedSumPName, conPName,
    infixPName, tildePName, bangPName, asPName, wildPName, recPName, listPName,
    sigPName, viewPName :: Name
247 248 249 250
litPName   = libFun (fsLit "litP")   litPIdKey
varPName   = libFun (fsLit "varP")   varPIdKey
tupPName   = libFun (fsLit "tupP")   tupPIdKey
unboxedTupPName = libFun (fsLit "unboxedTupP") unboxedTupPIdKey
251
unboxedSumPName = libFun (fsLit "unboxedSumP") unboxedSumPIdKey
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
conPName   = libFun (fsLit "conP")   conPIdKey
infixPName = libFun (fsLit "infixP") infixPIdKey
tildePName = libFun (fsLit "tildeP") tildePIdKey
bangPName  = libFun (fsLit "bangP")  bangPIdKey
asPName    = libFun (fsLit "asP")    asPIdKey
wildPName  = libFun (fsLit "wildP")  wildPIdKey
recPName   = libFun (fsLit "recP")   recPIdKey
listPName  = libFun (fsLit "listP")  listPIdKey
sigPName   = libFun (fsLit "sigP")   sigPIdKey
viewPName  = libFun (fsLit "viewP")  viewPIdKey

-- type FieldPat = ...
fieldPatName :: Name
fieldPatName = libFun (fsLit "fieldPat") fieldPatIdKey

-- data Match = ...
matchName :: Name
matchName = libFun (fsLit "match") matchIdKey

-- data Clause = ...
clauseName :: Name
clauseName = libFun (fsLit "clause") clauseIdKey

-- data Exp = ...
276
varEName, conEName, litEName, appEName, appTypeEName, infixEName, infixAppName,
277
    sectionLName, sectionRName, lamEName, lamCaseEName, tupEName,
278
    unboxedTupEName, unboxedSumEName, condEName, multiIfEName, letEName,
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301
    caseEName, doEName, mdoEName, compEName, staticEName, unboundVarEName,
    labelEName, implicitParamVarEName :: Name
varEName              = libFun (fsLit "varE")              varEIdKey
conEName              = libFun (fsLit "conE")              conEIdKey
litEName              = libFun (fsLit "litE")              litEIdKey
appEName              = libFun (fsLit "appE")              appEIdKey
appTypeEName          = libFun (fsLit "appTypeE")          appTypeEIdKey
infixEName            = libFun (fsLit "infixE")            infixEIdKey
infixAppName          = libFun (fsLit "infixApp")          infixAppIdKey
sectionLName          = libFun (fsLit "sectionL")          sectionLIdKey
sectionRName          = libFun (fsLit "sectionR")          sectionRIdKey
lamEName              = libFun (fsLit "lamE")              lamEIdKey
lamCaseEName          = libFun (fsLit "lamCaseE")          lamCaseEIdKey
tupEName              = libFun (fsLit "tupE")              tupEIdKey
unboxedTupEName       = libFun (fsLit "unboxedTupE")       unboxedTupEIdKey
unboxedSumEName       = libFun (fsLit "unboxedSumE")       unboxedSumEIdKey
condEName             = libFun (fsLit "condE")             condEIdKey
multiIfEName          = libFun (fsLit "multiIfE")          multiIfEIdKey
letEName              = libFun (fsLit "letE")              letEIdKey
caseEName             = libFun (fsLit "caseE")             caseEIdKey
doEName               = libFun (fsLit "doE")               doEIdKey
mdoEName              = libFun (fsLit "mdoE")              mdoEIdKey
compEName             = libFun (fsLit "compE")             compEIdKey
302 303
-- ArithSeq skips a level
fromEName, fromThenEName, fromToEName, fromThenToEName :: Name
304 305 306 307
fromEName             = libFun (fsLit "fromE")             fromEIdKey
fromThenEName         = libFun (fsLit "fromThenE")         fromThenEIdKey
fromToEName           = libFun (fsLit "fromToE")           fromToEIdKey
fromThenToEName       = libFun (fsLit "fromThenToE")       fromThenToEIdKey
308 309
-- end ArithSeq
listEName, sigEName, recConEName, recUpdEName :: Name
310 311 312 313 314 315 316 317
listEName             = libFun (fsLit "listE")             listEIdKey
sigEName              = libFun (fsLit "sigE")              sigEIdKey
recConEName           = libFun (fsLit "recConE")           recConEIdKey
recUpdEName           = libFun (fsLit "recUpdE")           recUpdEIdKey
staticEName           = libFun (fsLit "staticE")           staticEIdKey
unboundVarEName       = libFun (fsLit "unboundVarE")       unboundVarEIdKey
labelEName            = libFun (fsLit "labelE")            labelEIdKey
implicitParamVarEName = libFun (fsLit "implicitParamVarE") implicitParamVarEIdKey
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333

-- type FieldExp = ...
fieldExpName :: Name
fieldExpName = libFun (fsLit "fieldExp") fieldExpIdKey

-- data Body = ...
guardedBName, normalBName :: Name
guardedBName = libFun (fsLit "guardedB") guardedBIdKey
normalBName  = libFun (fsLit "normalB")  normalBIdKey

-- data Guard = ...
normalGEName, patGEName :: Name
normalGEName = libFun (fsLit "normalGE") normalGEIdKey
patGEName    = libFun (fsLit "patGE")    patGEIdKey

-- data Stmt = ...
334
bindSName, letSName, noBindSName, parSName, recSName :: Name
335 336 337 338
bindSName   = libFun (fsLit "bindS")   bindSIdKey
letSName    = libFun (fsLit "letS")    letSIdKey
noBindSName = libFun (fsLit "noBindS") noBindSIdKey
parSName    = libFun (fsLit "parS")    parSIdKey
339
recSName    = libFun (fsLit "recS")    recSIdKey
340 341 342

-- data Dec = ...
funDName, valDName, dataDName, newtypeDName, tySynDName, classDName,
343
    instanceWithOverlapDName, sigDName, forImpDName, pragInlDName,
Ryan Scott's avatar
Ryan Scott committed
344 345 346 347
    pragSpecDName, pragSpecInlDName, pragSpecInstDName, pragRuleDName,
    pragAnnDName, standaloneDerivWithStrategyDName, defaultSigDName,
    dataInstDName, newtypeInstDName, tySynInstDName, dataFamilyDName,
    openTypeFamilyDName, closedTypeFamilyDName, infixLDName, infixRDName,
348
    infixNDName, roleAnnotDName, patSynDName, patSynSigDName,
349
    pragCompleteDName, implicitParamBindDName :: Name
Ryan Scott's avatar
Ryan Scott committed
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379
funDName                         = libFun (fsLit "funD")                         funDIdKey
valDName                         = libFun (fsLit "valD")                         valDIdKey
dataDName                        = libFun (fsLit "dataD")                        dataDIdKey
newtypeDName                     = libFun (fsLit "newtypeD")                     newtypeDIdKey
tySynDName                       = libFun (fsLit "tySynD")                       tySynDIdKey
classDName                       = libFun (fsLit "classD")                       classDIdKey
instanceWithOverlapDName         = libFun (fsLit "instanceWithOverlapD")         instanceWithOverlapDIdKey
standaloneDerivWithStrategyDName = libFun (fsLit "standaloneDerivWithStrategyD") standaloneDerivWithStrategyDIdKey
sigDName                         = libFun (fsLit "sigD")                         sigDIdKey
defaultSigDName                  = libFun (fsLit "defaultSigD")                  defaultSigDIdKey
forImpDName                      = libFun (fsLit "forImpD")                      forImpDIdKey
pragInlDName                     = libFun (fsLit "pragInlD")                     pragInlDIdKey
pragSpecDName                    = libFun (fsLit "pragSpecD")                    pragSpecDIdKey
pragSpecInlDName                 = libFun (fsLit "pragSpecInlD")                 pragSpecInlDIdKey
pragSpecInstDName                = libFun (fsLit "pragSpecInstD")                pragSpecInstDIdKey
pragRuleDName                    = libFun (fsLit "pragRuleD")                    pragRuleDIdKey
pragCompleteDName                = libFun (fsLit "pragCompleteD")                pragCompleteDIdKey
pragAnnDName                     = libFun (fsLit "pragAnnD")                     pragAnnDIdKey
dataInstDName                    = libFun (fsLit "dataInstD")                    dataInstDIdKey
newtypeInstDName                 = libFun (fsLit "newtypeInstD")                 newtypeInstDIdKey
tySynInstDName                   = libFun (fsLit "tySynInstD")                   tySynInstDIdKey
openTypeFamilyDName              = libFun (fsLit "openTypeFamilyD")              openTypeFamilyDIdKey
closedTypeFamilyDName            = libFun (fsLit "closedTypeFamilyD")            closedTypeFamilyDIdKey
dataFamilyDName                  = libFun (fsLit "dataFamilyD")                  dataFamilyDIdKey
infixLDName                      = libFun (fsLit "infixLD")                      infixLDIdKey
infixRDName                      = libFun (fsLit "infixRD")                      infixRDIdKey
infixNDName                      = libFun (fsLit "infixND")                      infixNDIdKey
roleAnnotDName                   = libFun (fsLit "roleAnnotD")                   roleAnnotDIdKey
patSynDName                      = libFun (fsLit "patSynD")                      patSynDIdKey
patSynSigDName                   = libFun (fsLit "patSynSigD")                   patSynSigDIdKey
380
implicitParamBindDName           = libFun (fsLit "implicitParamBindD")           implicitParamBindDIdKey
381 382 383 384 385

-- type Ctxt = ...
cxtName :: Name
cxtName = libFun (fsLit "cxt") cxtIdKey

386 387 388 389 390 391 392 393 394 395 396
-- data SourceUnpackedness = ...
noSourceUnpackednessName, sourceNoUnpackName, sourceUnpackName :: Name
noSourceUnpackednessName = libFun (fsLit "noSourceUnpackedness") noSourceUnpackednessKey
sourceNoUnpackName       = libFun (fsLit "sourceNoUnpack")       sourceNoUnpackKey
sourceUnpackName         = libFun (fsLit "sourceUnpack")         sourceUnpackKey

-- data SourceStrictness = ...
noSourceStrictnessName, sourceLazyName, sourceStrictName :: Name
noSourceStrictnessName = libFun (fsLit "noSourceStrictness") noSourceStrictnessKey
sourceLazyName         = libFun (fsLit "sourceLazy")         sourceLazyKey
sourceStrictName       = libFun (fsLit "sourceStrict")       sourceStrictKey
397 398

-- data Con = ...
399 400 401 402 403 404 405
normalCName, recCName, infixCName, forallCName, gadtCName, recGadtCName :: Name
normalCName  = libFun (fsLit "normalC" ) normalCIdKey
recCName     = libFun (fsLit "recC"    ) recCIdKey
infixCName   = libFun (fsLit "infixC"  ) infixCIdKey
forallCName  = libFun (fsLit "forallC" ) forallCIdKey
gadtCName    = libFun (fsLit "gadtC"   ) gadtCIdKey
recGadtCName = libFun (fsLit "recGadtC") recGadtCIdKey
406

407 408 409 410 411 412 413
-- data Bang = ...
bangName :: Name
bangName = libFun (fsLit "bang") bangIdKey

-- type BangType = ...
bangTypeName :: Name
bangTypeName = libFun (fsLit "bangType") bangTKey
414

415 416 417
-- type VarBangType = ...
varBangTypeName :: Name
varBangTypeName = libFun (fsLit "varBangType") varBangTKey
418

419 420 421 422 423 424 425 426 427 428 429 430
-- data PatSynDir = ...
unidirPatSynName, implBidirPatSynName, explBidirPatSynName :: Name
unidirPatSynName    = libFun (fsLit "unidir")    unidirPatSynIdKey
implBidirPatSynName = libFun (fsLit "implBidir") implBidirPatSynIdKey
explBidirPatSynName = libFun (fsLit "explBidir") explBidirPatSynIdKey

-- data PatSynArgs = ...
prefixPatSynName, infixPatSynName, recordPatSynName :: Name
prefixPatSynName = libFun (fsLit "prefixPatSyn") prefixPatSynIdKey
infixPatSynName  = libFun (fsLit "infixPatSyn")  infixPatSynIdKey
recordPatSynName = libFun (fsLit "recordPatSyn") recordPatSynIdKey

431
-- data Type = ...
Ryan Scott's avatar
Ryan Scott committed
432 433 434
forallTName, forallVisTName, varTName, conTName, infixTName, tupleTName,
    unboxedTupleTName, unboxedSumTName, arrowTName, listTName, appTName,
    appKindTName, sigTName, equalityTName, litTName, promotedTName,
435
    promotedTupleTName, promotedNilTName, promotedConsTName,
436
    wildCardTName, implicitParamTName :: Name
437
forallTName         = libFun (fsLit "forallT")        forallTIdKey
Ryan Scott's avatar
Ryan Scott committed
438
forallVisTName      = libFun (fsLit "forallVisT")     forallVisTIdKey
439 440 441 442
varTName            = libFun (fsLit "varT")           varTIdKey
conTName            = libFun (fsLit "conT")           conTIdKey
tupleTName          = libFun (fsLit "tupleT")         tupleTIdKey
unboxedTupleTName   = libFun (fsLit "unboxedTupleT")  unboxedTupleTIdKey
443
unboxedSumTName     = libFun (fsLit "unboxedSumT")    unboxedSumTIdKey
444 445 446
arrowTName          = libFun (fsLit "arrowT")         arrowTIdKey
listTName           = libFun (fsLit "listT")          listTIdKey
appTName            = libFun (fsLit "appT")           appTIdKey
My Nguyen's avatar
My Nguyen committed
447
appKindTName        = libFun (fsLit "appKindT")       appKindTIdKey
448 449 450 451 452 453 454
sigTName            = libFun (fsLit "sigT")           sigTIdKey
equalityTName       = libFun (fsLit "equalityT")      equalityTIdKey
litTName            = libFun (fsLit "litT")           litTIdKey
promotedTName       = libFun (fsLit "promotedT")      promotedTIdKey
promotedTupleTName  = libFun (fsLit "promotedTupleT") promotedTupleTIdKey
promotedNilTName    = libFun (fsLit "promotedNilT")   promotedNilTIdKey
promotedConsTName   = libFun (fsLit "promotedConsT")  promotedConsTIdKey
thomasw's avatar
thomasw committed
455
wildCardTName       = libFun (fsLit "wildCardT")      wildCardTIdKey
My Nguyen's avatar
My Nguyen committed
456
infixTName          = libFun (fsLit "infixT")         infixTIdKey
457
implicitParamTName  = libFun (fsLit "implicitParamT") implicitParamTIdKey
458 459 460 461 462 463 464 465

-- data TyLit = ...
numTyLitName, strTyLitName :: Name
numTyLitName = libFun (fsLit "numTyLit") numTyLitIdKey
strTyLitName = libFun (fsLit "strTyLit") strTyLitIdKey

-- data TyVarBndr = ...
plainTVName, kindedTVName :: Name
Ryan Scott's avatar
Ryan Scott committed
466 467
plainTVName  = libFun (fsLit "plainTV")  plainTVIdKey
kindedTVName = libFun (fsLit "kindedTV") kindedTVIdKey
468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487

-- data Role = ...
nominalRName, representationalRName, phantomRName, inferRName :: Name
nominalRName          = libFun (fsLit "nominalR")          nominalRIdKey
representationalRName = libFun (fsLit "representationalR") representationalRIdKey
phantomRName          = libFun (fsLit "phantomR")          phantomRIdKey
inferRName            = libFun (fsLit "inferR")            inferRIdKey

-- data Kind = ...
varKName, conKName, tupleKName, arrowKName, listKName, appKName,
  starKName, constraintKName :: Name
varKName        = libFun (fsLit "varK")         varKIdKey
conKName        = libFun (fsLit "conK")         conKIdKey
tupleKName      = libFun (fsLit "tupleK")       tupleKIdKey
arrowKName      = libFun (fsLit "arrowK")       arrowKIdKey
listKName       = libFun (fsLit "listK")        listKIdKey
appKName        = libFun (fsLit "appK")         appKIdKey
starKName       = libFun (fsLit "starK")        starKIdKey
constraintKName = libFun (fsLit "constraintK")  constraintKIdKey

Jan Stolarek's avatar
Jan Stolarek committed
488 489
-- data FamilyResultSig = ...
noSigName, kindSigName, tyVarSigName :: Name
Ryan Scott's avatar
Ryan Scott committed
490 491 492
noSigName    = libFun (fsLit "noSig")    noSigIdKey
kindSigName  = libFun (fsLit "kindSig")  kindSigIdKey
tyVarSigName = libFun (fsLit "tyVarSig") tyVarSigIdKey
Jan Stolarek's avatar
Jan Stolarek committed
493 494 495 496 497

-- data InjectivityAnn = ...
injectivityAnnName :: Name
injectivityAnnName = libFun (fsLit "injectivityAnn") injectivityAnnIdKey

498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534
-- data Callconv = ...
cCallName, stdCallName, cApiCallName, primCallName, javaScriptCallName :: Name
cCallName = libFun (fsLit "cCall") cCallIdKey
stdCallName = libFun (fsLit "stdCall") stdCallIdKey
cApiCallName = libFun (fsLit "cApi") cApiCallIdKey
primCallName = libFun (fsLit "prim") primCallIdKey
javaScriptCallName = libFun (fsLit "javaScript") javaScriptCallIdKey

-- data Safety = ...
unsafeName, safeName, interruptibleName :: Name
unsafeName     = libFun (fsLit "unsafe") unsafeIdKey
safeName       = libFun (fsLit "safe") safeIdKey
interruptibleName = libFun (fsLit "interruptible") interruptibleIdKey

-- newtype TExp a = ...
tExpDataConName :: Name
tExpDataConName = thCon (fsLit "TExp") tExpDataConKey

-- data RuleBndr = ...
ruleVarName, typedRuleVarName :: Name
ruleVarName      = libFun (fsLit ("ruleVar"))      ruleVarIdKey
typedRuleVarName = libFun (fsLit ("typedRuleVar")) typedRuleVarIdKey

-- data FunDep = ...
funDepName :: Name
funDepName     = libFun (fsLit "funDep") funDepIdKey

-- data TySynEqn = ...
tySynEqnName :: Name
tySynEqnName = libFun (fsLit "tySynEqn") tySynEqnIdKey

-- data AnnTarget = ...
valueAnnotationName, typeAnnotationName, moduleAnnotationName :: Name
valueAnnotationName  = libFun (fsLit "valueAnnotation")  valueAnnotationIdKey
typeAnnotationName   = libFun (fsLit "typeAnnotation")   typeAnnotationIdKey
moduleAnnotationName = libFun (fsLit "moduleAnnotation") moduleAnnotationIdKey

Ryan Scott's avatar
Ryan Scott committed
535 536 537 538
-- type DerivClause = ...
derivClauseName :: Name
derivClauseName = libFun (fsLit "derivClause") derivClauseIdKey

Ryan Scott's avatar
Ryan Scott committed
539 540 541 542 543 544 545 546
-- data DerivStrategy = ...
stockStrategyName, anyclassStrategyName, newtypeStrategyName,
  viaStrategyName :: Name
stockStrategyName    = libFun (fsLit "stockStrategy")    stockStrategyIdKey
anyclassStrategyName = libFun (fsLit "anyclassStrategy") anyclassStrategyIdKey
newtypeStrategyName  = libFun (fsLit "newtypeStrategy")  newtypeStrategyIdKey
viaStrategyName      = libFun (fsLit "viaStrategy")      viaStrategyIdKey

547
matchQTyConName, clauseQTyConName, expQTyConName, stmtQTyConName,
548 549
    decQTyConName, conQTyConName, bangTypeQTyConName,
    varBangTypeQTyConName, typeQTyConName, fieldExpQTyConName,
550
    patQTyConName, fieldPatQTyConName, predQTyConName, decsQTyConName,
Ryan Scott's avatar
Ryan Scott committed
551
    ruleBndrQTyConName, tySynEqnQTyConName, roleTyConName,
Ryan Scott's avatar
Ryan Scott committed
552 553
    derivClauseQTyConName, kindQTyConName, tyVarBndrQTyConName,
    derivStrategyQTyConName :: Name
554 555 556 557 558 559 560
matchQTyConName         = libTc (fsLit "MatchQ")         matchQTyConKey
clauseQTyConName        = libTc (fsLit "ClauseQ")        clauseQTyConKey
expQTyConName           = libTc (fsLit "ExpQ")           expQTyConKey
stmtQTyConName          = libTc (fsLit "StmtQ")          stmtQTyConKey
decQTyConName           = libTc (fsLit "DecQ")           decQTyConKey
decsQTyConName          = libTc (fsLit "DecsQ")          decsQTyConKey  -- Q [Dec]
conQTyConName           = libTc (fsLit "ConQ")           conQTyConKey
561 562
bangTypeQTyConName      = libTc (fsLit "BangTypeQ")      bangTypeQTyConKey
varBangTypeQTyConName   = libTc (fsLit "VarBangTypeQ")   varBangTypeQTyConKey
563 564 565 566 567 568 569 570
typeQTyConName          = libTc (fsLit "TypeQ")          typeQTyConKey
fieldExpQTyConName      = libTc (fsLit "FieldExpQ")      fieldExpQTyConKey
patQTyConName           = libTc (fsLit "PatQ")           patQTyConKey
fieldPatQTyConName      = libTc (fsLit "FieldPatQ")      fieldPatQTyConKey
predQTyConName          = libTc (fsLit "PredQ")          predQTyConKey
ruleBndrQTyConName      = libTc (fsLit "RuleBndrQ")      ruleBndrQTyConKey
tySynEqnQTyConName      = libTc (fsLit "TySynEqnQ")      tySynEqnQTyConKey
roleTyConName           = libTc (fsLit "Role")           roleTyConKey
Ryan Scott's avatar
Ryan Scott committed
571
derivClauseQTyConName   = libTc (fsLit "DerivClauseQ")   derivClauseQTyConKey
Ryan Scott's avatar
Ryan Scott committed
572 573
kindQTyConName          = libTc (fsLit "KindQ")          kindQTyConKey
tyVarBndrQTyConName     = libTc (fsLit "TyVarBndrQ")     tyVarBndrQTyConKey
Ryan Scott's avatar
Ryan Scott committed
574
derivStrategyQTyConName = libTc (fsLit "DerivStrategyQ") derivStrategyQTyConKey
575 576 577 578 579 580 581 582

-- quasiquoting
quoteExpName, quotePatName, quoteDecName, quoteTypeName :: Name
quoteExpName        = qqFun (fsLit "quoteExp")  quoteExpKey
quotePatName        = qqFun (fsLit "quotePat")  quotePatKey
quoteDecName        = qqFun (fsLit "quoteDec")  quoteDecKey
quoteTypeName       = qqFun (fsLit "quoteType") quoteTypeKey

583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599
-- data Inline = ...
noInlineDataConName, inlineDataConName, inlinableDataConName :: Name
noInlineDataConName  = thCon (fsLit "NoInline")  noInlineDataConKey
inlineDataConName    = thCon (fsLit "Inline")    inlineDataConKey
inlinableDataConName = thCon (fsLit "Inlinable") inlinableDataConKey

-- data RuleMatch = ...
conLikeDataConName, funLikeDataConName :: Name
conLikeDataConName = thCon (fsLit "ConLike") conLikeDataConKey
funLikeDataConName = thCon (fsLit "FunLike") funLikeDataConKey

-- data Phases = ...
allPhasesDataConName, fromPhaseDataConName, beforePhaseDataConName :: Name
allPhasesDataConName   = thCon (fsLit "AllPhases")   allPhasesDataConKey
fromPhaseDataConName   = thCon (fsLit "FromPhase")   fromPhaseDataConKey
beforePhaseDataConName = thCon (fsLit "BeforePhase") beforePhaseDataConKey

600 601 602 603 604 605 606 607 608 609
-- data Overlap = ...
overlappableDataConName,
  overlappingDataConName,
  overlapsDataConName,
  incoherentDataConName :: Name
overlappableDataConName = thCon (fsLit "Overlappable") overlappableDataConKey
overlappingDataConName  = thCon (fsLit "Overlapping")  overlappingDataConKey
overlapsDataConName     = thCon (fsLit "Overlaps")     overlapsDataConKey
incoherentDataConName   = thCon (fsLit "Incoherent")   incoherentDataConKey

610 611 612 613 614 615
{- *********************************************************************
*                                                                      *
                     Class keys
*                                                                      *
********************************************************************* -}

Ryan Scott's avatar
Ryan Scott committed
616 617 618 619 620 621
-- ClassUniques available: 200-299
-- Check in PrelNames if you want to change this

liftClassKey :: Unique
liftClassKey = mkPreludeClassUnique 200

622 623 624 625 626 627
{- *********************************************************************
*                                                                      *
                     TyCon keys
*                                                                      *
********************************************************************* -}

628 629 630 631 632
-- TyConUniques available: 200-299
-- Check in PrelNames if you want to change this

expTyConKey, matchTyConKey, clauseTyConKey, qTyConKey, expQTyConKey,
    decQTyConKey, patTyConKey, matchQTyConKey, clauseQTyConKey,
Ryan Scott's avatar
Ryan Scott committed
633 634
    stmtQTyConKey, conQTyConKey, typeQTyConKey, typeTyConKey,
    tyVarBndrQTyConKey, decTyConKey, bangTypeQTyConKey, varBangTypeQTyConKey,
635 636 637
    fieldExpTyConKey, fieldPatTyConKey, nameTyConKey, patQTyConKey,
    fieldPatQTyConKey, fieldExpQTyConKey, funDepTyConKey, predTyConKey,
    predQTyConKey, decsQTyConKey, ruleBndrQTyConKey, tySynEqnQTyConKey,
Ryan Scott's avatar
Ryan Scott committed
638
    roleTyConKey, tExpTyConKey, injAnnTyConKey, kindQTyConKey,
Ryan Scott's avatar
Ryan Scott committed
639
    overlapTyConKey, derivClauseQTyConKey, derivStrategyQTyConKey :: Unique
640 641 642 643 644 645 646 647 648 649 650 651 652 653
expTyConKey             = mkPreludeTyConUnique 200
matchTyConKey           = mkPreludeTyConUnique 201
clauseTyConKey          = mkPreludeTyConUnique 202
qTyConKey               = mkPreludeTyConUnique 203
expQTyConKey            = mkPreludeTyConUnique 204
decQTyConKey            = mkPreludeTyConUnique 205
patTyConKey             = mkPreludeTyConUnique 206
matchQTyConKey          = mkPreludeTyConUnique 207
clauseQTyConKey         = mkPreludeTyConUnique 208
stmtQTyConKey           = mkPreludeTyConUnique 209
conQTyConKey            = mkPreludeTyConUnique 210
typeQTyConKey           = mkPreludeTyConUnique 211
typeTyConKey            = mkPreludeTyConUnique 212
decTyConKey             = mkPreludeTyConUnique 213
654 655
bangTypeQTyConKey       = mkPreludeTyConUnique 214
varBangTypeQTyConKey    = mkPreludeTyConUnique 215
656 657 658 659 660 661 662 663 664
fieldExpTyConKey        = mkPreludeTyConUnique 216
fieldPatTyConKey        = mkPreludeTyConUnique 217
nameTyConKey            = mkPreludeTyConUnique 218
patQTyConKey            = mkPreludeTyConUnique 219
fieldPatQTyConKey       = mkPreludeTyConUnique 220
fieldExpQTyConKey       = mkPreludeTyConUnique 221
funDepTyConKey          = mkPreludeTyConUnique 222
predTyConKey            = mkPreludeTyConUnique 223
predQTyConKey           = mkPreludeTyConUnique 224
Ryan Scott's avatar
Ryan Scott committed
665
tyVarBndrQTyConKey      = mkPreludeTyConUnique 225
666 667 668 669 670
decsQTyConKey           = mkPreludeTyConUnique 226
ruleBndrQTyConKey       = mkPreludeTyConUnique 227
tySynEqnQTyConKey       = mkPreludeTyConUnique 228
roleTyConKey            = mkPreludeTyConUnique 229
tExpTyConKey            = mkPreludeTyConUnique 230
Jan Stolarek's avatar
Jan Stolarek committed
671
injAnnTyConKey          = mkPreludeTyConUnique 231
Ryan Scott's avatar
Ryan Scott committed
672
kindQTyConKey           = mkPreludeTyConUnique 232
673
overlapTyConKey         = mkPreludeTyConUnique 233
Ryan Scott's avatar
Ryan Scott committed
674
derivClauseQTyConKey    = mkPreludeTyConUnique 234
Ryan Scott's avatar
Ryan Scott committed
675
derivStrategyQTyConKey  = mkPreludeTyConUnique 235
676

677 678 679 680 681 682 683 684 685 686 687
{- *********************************************************************
*                                                                      *
                     DataCon keys
*                                                                      *
********************************************************************* -}

-- DataConUniques available: 100-150
-- If you want to change this, make sure you check in PrelNames

-- data Inline = ...
noInlineDataConKey, inlineDataConKey, inlinableDataConKey :: Unique
Ben Gamari's avatar
Ben Gamari committed
688 689 690
noInlineDataConKey  = mkPreludeDataConUnique 200
inlineDataConKey    = mkPreludeDataConUnique 201
inlinableDataConKey = mkPreludeDataConUnique 202
691 692 693

-- data RuleMatch = ...
conLikeDataConKey, funLikeDataConKey :: Unique
Ben Gamari's avatar
Ben Gamari committed
694 695
conLikeDataConKey = mkPreludeDataConUnique 203
funLikeDataConKey = mkPreludeDataConUnique 204
696 697 698

-- data Phases = ...
allPhasesDataConKey, fromPhaseDataConKey, beforePhaseDataConKey :: Unique
Ben Gamari's avatar
Ben Gamari committed
699 700 701
allPhasesDataConKey   = mkPreludeDataConUnique 205
fromPhaseDataConKey   = mkPreludeDataConUnique 206
beforePhaseDataConKey = mkPreludeDataConUnique 207
702 703 704

-- newtype TExp a = ...
tExpDataConKey :: Unique
Ben Gamari's avatar
Ben Gamari committed
705
tExpDataConKey = mkPreludeDataConUnique 208
706

707 708 709 710 711
-- data Overlap = ..
overlappableDataConKey,
  overlappingDataConKey,
  overlapsDataConKey,
  incoherentDataConKey :: Unique
Ben Gamari's avatar
Ben Gamari committed
712 713 714 715
overlappableDataConKey = mkPreludeDataConUnique 209
overlappingDataConKey  = mkPreludeDataConUnique 210
overlapsDataConKey     = mkPreludeDataConUnique 211
incoherentDataConKey   = mkPreludeDataConUnique 212
716

717 718 719 720 721 722
{- *********************************************************************
*                                                                      *
                     Id keys
*                                                                      *
********************************************************************* -}

723 724 725 726 727
-- IdUniques available: 200-499
-- If you want to change this, make sure you check in PrelNames

returnQIdKey, bindQIdKey, sequenceQIdKey, liftIdKey, newNameIdKey,
    mkNameIdKey, mkNameG_vIdKey, mkNameG_dIdKey, mkNameG_tcIdKey,
728 729
    mkNameLIdKey, mkNameSIdKey, unTypeIdKey, unTypeQIdKey,
    unsafeTExpCoerceIdKey :: Unique
730 731 732 733 734 735 736 737 738 739
returnQIdKey        = mkPreludeMiscIdUnique 200
bindQIdKey          = mkPreludeMiscIdUnique 201
sequenceQIdKey      = mkPreludeMiscIdUnique 202
liftIdKey           = mkPreludeMiscIdUnique 203
newNameIdKey         = mkPreludeMiscIdUnique 204
mkNameIdKey          = mkPreludeMiscIdUnique 205
mkNameG_vIdKey       = mkPreludeMiscIdUnique 206
mkNameG_dIdKey       = mkPreludeMiscIdUnique 207
mkNameG_tcIdKey      = mkPreludeMiscIdUnique 208
mkNameLIdKey         = mkPreludeMiscIdUnique 209
740 741 742 743
mkNameSIdKey         = mkPreludeMiscIdUnique 210
unTypeIdKey          = mkPreludeMiscIdUnique 211
unTypeQIdKey         = mkPreludeMiscIdUnique 212
unsafeTExpCoerceIdKey = mkPreludeMiscIdUnique 213
744 745 746 747


-- data Lit = ...
charLIdKey, stringLIdKey, integerLIdKey, intPrimLIdKey, wordPrimLIdKey,
748 749
    floatPrimLIdKey, doublePrimLIdKey, rationalLIdKey, stringPrimLIdKey,
    charPrimLIdKey:: Unique
750 751 752 753 754 755 756 757
charLIdKey        = mkPreludeMiscIdUnique 220
stringLIdKey      = mkPreludeMiscIdUnique 221
integerLIdKey     = mkPreludeMiscIdUnique 222
intPrimLIdKey     = mkPreludeMiscIdUnique 223
wordPrimLIdKey    = mkPreludeMiscIdUnique 224
floatPrimLIdKey   = mkPreludeMiscIdUnique 225
doublePrimLIdKey  = mkPreludeMiscIdUnique 226
rationalLIdKey    = mkPreludeMiscIdUnique 227
758 759
stringPrimLIdKey  = mkPreludeMiscIdUnique 228
charPrimLIdKey    = mkPreludeMiscIdUnique 229
760 761

liftStringIdKey :: Unique
762
liftStringIdKey     = mkPreludeMiscIdUnique 230
763 764

-- data Pat = ...
765 766 767
litPIdKey, varPIdKey, tupPIdKey, unboxedTupPIdKey, unboxedSumPIdKey, conPIdKey,
  infixPIdKey, tildePIdKey, bangPIdKey, asPIdKey, wildPIdKey, recPIdKey,
  listPIdKey, sigPIdKey, viewPIdKey :: Unique
768 769 770 771
litPIdKey         = mkPreludeMiscIdUnique 240
varPIdKey         = mkPreludeMiscIdUnique 241
tupPIdKey         = mkPreludeMiscIdUnique 242
unboxedTupPIdKey  = mkPreludeMiscIdUnique 243
772 773 774 775 776 777 778 779 780 781 782
unboxedSumPIdKey  = mkPreludeMiscIdUnique 244
conPIdKey         = mkPreludeMiscIdUnique 245
infixPIdKey       = mkPreludeMiscIdUnique 246
tildePIdKey       = mkPreludeMiscIdUnique 247
bangPIdKey        = mkPreludeMiscIdUnique 248
asPIdKey          = mkPreludeMiscIdUnique 249
wildPIdKey        = mkPreludeMiscIdUnique 250
recPIdKey         = mkPreludeMiscIdUnique 251
listPIdKey        = mkPreludeMiscIdUnique 252
sigPIdKey         = mkPreludeMiscIdUnique 253
viewPIdKey        = mkPreludeMiscIdUnique 254
783 784 785 786 787 788 789 790 791 792 793 794 795 796 797

-- type FieldPat = ...
fieldPatIdKey :: Unique
fieldPatIdKey       = mkPreludeMiscIdUnique 260

-- data Match = ...
matchIdKey :: Unique
matchIdKey          = mkPreludeMiscIdUnique 261

-- data Clause = ...
clauseIdKey :: Unique
clauseIdKey         = mkPreludeMiscIdUnique 262


-- data Exp = ...
798 799 800
varEIdKey, conEIdKey, litEIdKey, appEIdKey, appTypeEIdKey, infixEIdKey,
    infixAppIdKey, sectionLIdKey, sectionRIdKey, lamEIdKey, lamCaseEIdKey,
    tupEIdKey, unboxedTupEIdKey, unboxedSumEIdKey, condEIdKey, multiIfEIdKey,
801 802
    letEIdKey, caseEIdKey, doEIdKey, compEIdKey,
    fromEIdKey, fromThenEIdKey, fromToEIdKey, fromThenToEIdKey,
803
    listEIdKey, sigEIdKey, recConEIdKey, recUpdEIdKey, staticEIdKey,
804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837
    unboundVarEIdKey, labelEIdKey, implicitParamVarEIdKey, mdoEIdKey :: Unique
varEIdKey              = mkPreludeMiscIdUnique 270
conEIdKey              = mkPreludeMiscIdUnique 271
litEIdKey              = mkPreludeMiscIdUnique 272
appEIdKey              = mkPreludeMiscIdUnique 273
appTypeEIdKey          = mkPreludeMiscIdUnique 274
infixEIdKey            = mkPreludeMiscIdUnique 275
infixAppIdKey          = mkPreludeMiscIdUnique 276
sectionLIdKey          = mkPreludeMiscIdUnique 277
sectionRIdKey          = mkPreludeMiscIdUnique 278
lamEIdKey              = mkPreludeMiscIdUnique 279
lamCaseEIdKey          = mkPreludeMiscIdUnique 280
tupEIdKey              = mkPreludeMiscIdUnique 281
unboxedTupEIdKey       = mkPreludeMiscIdUnique 282
unboxedSumEIdKey       = mkPreludeMiscIdUnique 283
condEIdKey             = mkPreludeMiscIdUnique 284
multiIfEIdKey          = mkPreludeMiscIdUnique 285
letEIdKey              = mkPreludeMiscIdUnique 286
caseEIdKey             = mkPreludeMiscIdUnique 287
doEIdKey               = mkPreludeMiscIdUnique 288
compEIdKey             = mkPreludeMiscIdUnique 289
fromEIdKey             = mkPreludeMiscIdUnique 290
fromThenEIdKey         = mkPreludeMiscIdUnique 291
fromToEIdKey           = mkPreludeMiscIdUnique 292
fromThenToEIdKey       = mkPreludeMiscIdUnique 293
listEIdKey             = mkPreludeMiscIdUnique 294
sigEIdKey              = mkPreludeMiscIdUnique 295
recConEIdKey           = mkPreludeMiscIdUnique 296
recUpdEIdKey           = mkPreludeMiscIdUnique 297
staticEIdKey           = mkPreludeMiscIdUnique 298
unboundVarEIdKey       = mkPreludeMiscIdUnique 299
labelEIdKey            = mkPreludeMiscIdUnique 300
implicitParamVarEIdKey = mkPreludeMiscIdUnique 301
mdoEIdKey              = mkPreludeMiscIdUnique 302
838 839 840

-- type FieldExp = ...
fieldExpIdKey :: Unique
841
fieldExpIdKey       = mkPreludeMiscIdUnique 305
842 843 844

-- data Body = ...
guardedBIdKey, normalBIdKey :: Unique
845 846
guardedBIdKey     = mkPreludeMiscIdUnique 306
normalBIdKey      = mkPreludeMiscIdUnique 307
847 848 849

-- data Guard = ...
normalGEIdKey, patGEIdKey :: Unique
850 851
normalGEIdKey     = mkPreludeMiscIdUnique 308
patGEIdKey        = mkPreludeMiscIdUnique 309
852 853

-- data Stmt = ...
854
bindSIdKey, letSIdKey, noBindSIdKey, parSIdKey, recSIdKey :: Unique
855 856 857 858
bindSIdKey       = mkPreludeMiscIdUnique 310
letSIdKey        = mkPreludeMiscIdUnique 311
noBindSIdKey     = mkPreludeMiscIdUnique 312
parSIdKey        = mkPreludeMiscIdUnique 313
859
recSIdKey        = mkPreludeMiscIdUnique 314
860 861

-- data Dec = ...
862 863 864 865 866
funDIdKey, valDIdKey, dataDIdKey, newtypeDIdKey, tySynDIdKey, classDIdKey,
    instanceWithOverlapDIdKey, instanceDIdKey, sigDIdKey, forImpDIdKey,
    pragInlDIdKey, pragSpecDIdKey, pragSpecInlDIdKey, pragSpecInstDIdKey,
    pragRuleDIdKey, pragAnnDIdKey, defaultSigDIdKey, dataFamilyDIdKey,
    openTypeFamilyDIdKey, closedTypeFamilyDIdKey, dataInstDIdKey,
Ryan Scott's avatar
Ryan Scott committed
867 868
    newtypeInstDIdKey, tySynInstDIdKey, standaloneDerivWithStrategyDIdKey,
    infixLDIdKey, infixRDIdKey, infixNDIdKey, roleAnnotDIdKey, patSynDIdKey,
869
    patSynSigDIdKey, pragCompleteDIdKey, implicitParamBindDIdKey :: Unique
Ryan Scott's avatar
Ryan Scott committed
870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899
funDIdKey                         = mkPreludeMiscIdUnique 320
valDIdKey                         = mkPreludeMiscIdUnique 321
dataDIdKey                        = mkPreludeMiscIdUnique 322
newtypeDIdKey                     = mkPreludeMiscIdUnique 323
tySynDIdKey                       = mkPreludeMiscIdUnique 324
classDIdKey                       = mkPreludeMiscIdUnique 325
instanceWithOverlapDIdKey         = mkPreludeMiscIdUnique 326
instanceDIdKey                    = mkPreludeMiscIdUnique 327
sigDIdKey                         = mkPreludeMiscIdUnique 328
forImpDIdKey                      = mkPreludeMiscIdUnique 329
pragInlDIdKey                     = mkPreludeMiscIdUnique 330
pragSpecDIdKey                    = mkPreludeMiscIdUnique 331
pragSpecInlDIdKey                 = mkPreludeMiscIdUnique 332
pragSpecInstDIdKey                = mkPreludeMiscIdUnique 333
pragRuleDIdKey                    = mkPreludeMiscIdUnique 334
pragAnnDIdKey                     = mkPreludeMiscIdUnique 335
dataFamilyDIdKey                  = mkPreludeMiscIdUnique 336
openTypeFamilyDIdKey              = mkPreludeMiscIdUnique 337
dataInstDIdKey                    = mkPreludeMiscIdUnique 338
newtypeInstDIdKey                 = mkPreludeMiscIdUnique 339
tySynInstDIdKey                   = mkPreludeMiscIdUnique 340
closedTypeFamilyDIdKey            = mkPreludeMiscIdUnique 341
infixLDIdKey                      = mkPreludeMiscIdUnique 342
infixRDIdKey                      = mkPreludeMiscIdUnique 343
infixNDIdKey                      = mkPreludeMiscIdUnique 344
roleAnnotDIdKey                   = mkPreludeMiscIdUnique 345
standaloneDerivWithStrategyDIdKey = mkPreludeMiscIdUnique 346
defaultSigDIdKey                  = mkPreludeMiscIdUnique 347
patSynDIdKey                      = mkPreludeMiscIdUnique 348
patSynSigDIdKey                   = mkPreludeMiscIdUnique 349
900
pragCompleteDIdKey                = mkPreludeMiscIdUnique 350
901
implicitParamBindDIdKey           = mkPreludeMiscIdUnique 351
902 903 904

-- type Cxt = ...
cxtIdKey :: Unique
905
cxtIdKey               = mkPreludeMiscIdUnique 361
906

907 908
-- data SourceUnpackedness = ...
noSourceUnpackednessKey, sourceNoUnpackKey, sourceUnpackKey :: Unique
909 910 911
noSourceUnpackednessKey = mkPreludeMiscIdUnique 362
sourceNoUnpackKey       = mkPreludeMiscIdUnique 363
sourceUnpackKey         = mkPreludeMiscIdUnique 364
912 913 914

-- data SourceStrictness = ...
noSourceStrictnessKey, sourceLazyKey, sourceStrictKey :: Unique
915 916 917
noSourceStrictnessKey   = mkPreludeMiscIdUnique 365
sourceLazyKey           = mkPreludeMiscIdUnique 366
sourceStrictKey         = mkPreludeMiscIdUnique 367
918 919

-- data Con = ...
920 921
normalCIdKey, recCIdKey, infixCIdKey, forallCIdKey, gadtCIdKey,
  recGadtCIdKey :: Unique
922 923 924 925 926 927
normalCIdKey      = mkPreludeMiscIdUnique 368
recCIdKey         = mkPreludeMiscIdUnique 369
infixCIdKey       = mkPreludeMiscIdUnique 370
forallCIdKey      = mkPreludeMiscIdUnique 371
gadtCIdKey        = mkPreludeMiscIdUnique 372
recGadtCIdKey     = mkPreludeMiscIdUnique 373
928

929 930
-- data Bang = ...
bangIdKey :: Unique
931
bangIdKey         = mkPreludeMiscIdUnique 374
932 933 934

-- type BangType = ...
bangTKey :: Unique
935
bangTKey          = mkPreludeMiscIdUnique 375
936

937 938
-- type VarBangType = ...
varBangTKey :: Unique
939
varBangTKey       = mkPreludeMiscIdUnique 376
940 941 942

-- data PatSynDir = ...
unidirPatSynIdKey, implBidirPatSynIdKey, explBidirPatSynIdKey :: Unique
943 944 945
unidirPatSynIdKey    = mkPreludeMiscIdUnique 377
implBidirPatSynIdKey = mkPreludeMiscIdUnique 378
explBidirPatSynIdKey = mkPreludeMiscIdUnique 379
946 947 948

-- data PatSynArgs = ...
prefixPatSynIdKey, infixPatSynIdKey, recordPatSynIdKey :: Unique
949 950 951
prefixPatSynIdKey = mkPreludeMiscIdUnique 380
infixPatSynIdKey  = mkPreludeMiscIdUnique 381
recordPatSynIdKey = mkPreludeMiscIdUnique 382
952 953

-- data Type = ...
Ryan Scott's avatar
Ryan Scott committed
954 955 956
forallTIdKey, forallVisTIdKey, varTIdKey, conTIdKey, tupleTIdKey,
    unboxedTupleTIdKey, unboxedSumTIdKey, arrowTIdKey, listTIdKey, appTIdKey,
    appKindTIdKey, sigTIdKey, equalityTIdKey, litTIdKey, promotedTIdKey,
957
    promotedTupleTIdKey, promotedNilTIdKey, promotedConsTIdKey,
My Nguyen's avatar
My Nguyen committed
958 959
    wildCardTIdKey, implicitParamTIdKey, infixTIdKey :: Unique
forallTIdKey        = mkPreludeMiscIdUnique 390
Ryan Scott's avatar
Ryan Scott committed
960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979
forallVisTIdKey     = mkPreludeMiscIdUnique 391
varTIdKey           = mkPreludeMiscIdUnique 392
conTIdKey           = mkPreludeMiscIdUnique 393
tupleTIdKey         = mkPreludeMiscIdUnique 394
unboxedTupleTIdKey  = mkPreludeMiscIdUnique 395
unboxedSumTIdKey    = mkPreludeMiscIdUnique 396
arrowTIdKey         = mkPreludeMiscIdUnique 397
listTIdKey          = mkPreludeMiscIdUnique 398
appTIdKey           = mkPreludeMiscIdUnique 399
appKindTIdKey       = mkPreludeMiscIdUnique 400
sigTIdKey           = mkPreludeMiscIdUnique 401
equalityTIdKey      = mkPreludeMiscIdUnique 402
litTIdKey           = mkPreludeMiscIdUnique 403
promotedTIdKey      = mkPreludeMiscIdUnique 404
promotedTupleTIdKey = mkPreludeMiscIdUnique 405
promotedNilTIdKey   = mkPreludeMiscIdUnique 406
promotedConsTIdKey  = mkPreludeMiscIdUnique 407
wildCardTIdKey      = mkPreludeMiscIdUnique 408
implicitParamTIdKey = mkPreludeMiscIdUnique 409
infixTIdKey         = mkPreludeMiscIdUnique 410
980 981 982

-- data TyLit = ...
numTyLitIdKey, strTyLitIdKey :: Unique
Ryan Scott's avatar
Ryan Scott committed
983 984
numTyLitIdKey = mkPreludeMiscIdUnique 411
strTyLitIdKey = mkPreludeMiscIdUnique 412
985 986 987

-- data TyVarBndr = ...
plainTVIdKey, kindedTVIdKey :: Unique
Ryan Scott's avatar
Ryan Scott committed
988 989
plainTVIdKey       = mkPreludeMiscIdUnique 413
kindedTVIdKey      = mkPreludeMiscIdUnique 414
990 991 992

-- data Role = ...
nominalRIdKey, representationalRIdKey, phantomRIdKey, inferRIdKey :: Unique
Ryan Scott's avatar
Ryan Scott committed
993 994 995 996
nominalRIdKey          = mkPreludeMiscIdUnique 415
representationalRIdKey = mkPreludeMiscIdUnique 416
phantomRIdKey          = mkPreludeMiscIdUnique 417
inferRIdKey            = mkPreludeMiscIdUnique 418
997 998 999 1000

-- data Kind = ...
varKIdKey, conKIdKey, tupleKIdKey, arrowKIdKey, listKIdKey, appKIdKey,
  starKIdKey, constraintKIdKey :: Unique
Ryan Scott's avatar
Ryan Scott committed
1001 1002 1003 1004 1005 1006 1007 1008
varKIdKey         = mkPreludeMiscIdUnique 419
conKIdKey         = mkPreludeMiscIdUnique 420
tupleKIdKey       = mkPreludeMiscIdUnique 421
arrowKIdKey       = mkPreludeMiscIdUnique 422
listKIdKey        = mkPreludeMiscIdUnique 423
appKIdKey         = mkPreludeMiscIdUnique 424
starKIdKey        = mkPreludeMiscIdUnique 425
constraintKIdKey  = mkPreludeMiscIdUnique 426
1009

Jan Stolarek's avatar
Jan Stolarek committed
1010 1011
-- data FamilyResultSig = ...
noSigIdKey, kindSigIdKey, tyVarSigIdKey :: Unique
Ryan Scott's avatar
Ryan Scott committed
1012 1013 1014
noSigIdKey        = mkPreludeMiscIdUnique 427
kindSigIdKey      = mkPreludeMiscIdUnique 428
tyVarSigIdKey     = mkPreludeMiscIdUnique 429
Jan Stolarek's avatar
Jan Stolarek committed
1015 1016 1017

-- data InjectivityAnn = ...
injectivityAnnIdKey :: Unique
Ryan Scott's avatar
Ryan Scott committed
1018
injectivityAnnIdKey = mkPreludeMiscIdUnique 430
Jan Stolarek's avatar
Jan Stolarek committed
1019

1020 1021 1022
-- data Callconv = ...
cCallIdKey, stdCallIdKey, cApiCallIdKey, primCallIdKey,
  javaScriptCallIdKey :: Unique
Ryan Scott's avatar
Ryan Scott committed
1023 1024 1025 1026 1027
cCallIdKey          = mkPreludeMiscIdUnique 431
stdCallIdKey        = mkPreludeMiscIdUnique 432
cApiCallIdKey       = mkPreludeMiscIdUnique 433
primCallIdKey       = mkPreludeMiscIdUnique 434
javaScriptCallIdKey = mkPreludeMiscIdUnique 435
1028 1029 1030

-- data Safety = ...
unsafeIdKey, safeIdKey, interruptibleIdKey :: Unique
1031 1032 1033
unsafeIdKey        = mkPreludeMiscIdUnique 440
safeIdKey          = mkPreludeMiscIdUnique 441
interruptibleIdKey = mkPreludeMiscIdUnique 442
1034 1035 1036

-- data FunDep = ...
funDepIdKey :: Unique
1037
funDepIdKey = mkPreludeMiscIdUnique 445
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059

-- data TySynEqn = ...
tySynEqnIdKey :: Unique
tySynEqnIdKey = mkPreludeMiscIdUnique 460

-- quasiquoting
quoteExpKey, quotePatKey, quoteDecKey, quoteTypeKey :: Unique
quoteExpKey  = mkPreludeMiscIdUnique 470
quotePatKey  = mkPreludeMiscIdUnique 471
quoteDecKey  = mkPreludeMiscIdUnique 472
quoteTypeKey = mkPreludeMiscIdUnique 473

-- data RuleBndr = ...
ruleVarIdKey, typedRuleVarIdKey :: Unique
ruleVarIdKey      = mkPreludeMiscIdUnique 480
typedRuleVarIdKey = mkPreludeMiscIdUnique 481

-- data AnnTarget = ...
valueAnnotationIdKey, typeAnnotationIdKey, moduleAnnotationIdKey :: Unique
valueAnnotationIdKey  = mkPreludeMiscIdUnique 490
typeAnnotationIdKey   = mkPreludeMiscIdUnique 491
moduleAnnotationIdKey = mkPreludeMiscIdUnique 492
Ryan Scott's avatar
Ryan Scott committed
1060

Ryan Scott's avatar
Ryan Scott committed
1061 1062 1063 1064
-- type DerivPred = ...
derivClauseIdKey :: Unique
derivClauseIdKey = mkPreludeMiscIdUnique 493

Ryan Scott's avatar
Ryan Scott committed
1065 1066 1067 1068 1069 1070 1071 1072
-- data DerivStrategy = ...
stockStrategyIdKey, anyclassStrategyIdKey, newtypeStrategyIdKey,
  viaStrategyIdKey :: Unique
stockStrategyIdKey    = mkPreludeDataConUnique 494
anyclassStrategyIdKey = mkPreludeDataConUnique 495
newtypeStrategyIdKey  = mkPreludeDataConUnique 496
viaStrategyIdKey      = mkPreludeDataConUnique 497

Ryan Scott's avatar
Ryan Scott committed
1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102
{-
************************************************************************
*                                                                      *
                        RdrNames
*                                                                      *
************************************************************************
-}

lift_RDR, mkNameG_dRDR, mkNameG_vRDR :: RdrName
lift_RDR     = nameRdrName liftName
mkNameG_dRDR = nameRdrName mkNameG_dName
mkNameG_vRDR = nameRdrName mkNameG_vName

-- data Exp = ...
conE_RDR, litE_RDR, appE_RDR, infixApp_RDR :: RdrName
conE_RDR     = nameRdrName conEName
litE_RDR     = nameRdrName litEName
appE_RDR     = nameRdrName appEName
infixApp_RDR = nameRdrName infixAppName

-- data Lit = ...
stringL_RDR, intPrimL_RDR, wordPrimL_RDR, floatPrimL_RDR,
    doublePrimL_RDR, stringPrimL_RDR, charPrimL_RDR :: RdrName
stringL_RDR     = nameRdrName stringLName
intPrimL_RDR    = nameRdrName intPrimLName
wordPrimL_RDR   = nameRdrName wordPrimLName
floatPrimL_RDR  = nameRdrName floatPrimLName
doublePrimL_RDR = nameRdrName doublePrimLName
stringPrimL_RDR = nameRdrName stringPrimLName
charPrimL_RDR   = nameRdrName charPrimLName