-templateHaskellNames
- = mkNameSet [ intPrimLName, floatPrimLName, doublePrimLName,
- integerLName, charLName, stringLName, rationalLName,
- plitName, pvarName, ptupName,
- pconName, ptildeName, paspatName, pwildName,
- varName, conName, litName, appName, infixEName, lamName,
- tupName, doEName, compName,
- listExpName, sigExpName, condName, letEName, caseEName,
- infixAppName, sectionLName, sectionRName,
- guardedName, normalName,
- bindStName, letStName, noBindStName, parStName,
- fromName, fromThenName, fromToName, fromThenToName,
- funName, valName, liftName,
- gensymName, returnQName, bindQName, sequenceQName,
- matchName, clauseName, funName, valName, tySynDName, dataDName, classDName,
- instName, protoName, tforallName, tvarName, tconName, tappName,
- arrowTyConName, tupleTyConName, listTyConName, namedTyConName,
- ctxtName, constrName, recConstrName, infixConstrName,
- exprTyConName, declTyConName, pattTyConName, mtchTyConName,
- clseTyConName, stmtTyConName, consTyConName, typeTyConName,
- strTypeTyConName, varStrTypeTyConName,
- qTyConName, expTyConName, matTyConName, clsTyConName,
- decTyConName, typTyConName, strictTypeName, varStrictTypeName,
- recConName, recUpdName, precName,
- fieldName, fieldTyConName, fieldPName, fieldPTyConName,
- strictName, nonstrictName ]
-
-
-varQual = mk_known_key_name OccName.varName
-tcQual = mk_known_key_name OccName.tcName
-
-thModule :: Module
--- NB: the THSyntax module comes from the "haskell-src" package
-thModule = mkThPkgModule mETA_META_Name
-
-mk_known_key_name space str uniq
- = mkKnownKeyExternalName thModule (mkOccFS space str) uniq
-
-intPrimLName = varQual FSLIT("intPrimL") intPrimLIdKey
-floatPrimLName = varQual FSLIT("floatPrimL") floatPrimLIdKey
-doublePrimLName = varQual FSLIT("doublePrimL") doublePrimLIdKey
-integerLName = varQual FSLIT("integerL") integerLIdKey
-charLName = varQual FSLIT("charL") charLIdKey
-stringLName = varQual FSLIT("stringL") stringLIdKey
-rationalLName = varQual FSLIT("rationalL") rationalLIdKey
-plitName = varQual FSLIT("plit") plitIdKey
-pvarName = varQual FSLIT("pvar") pvarIdKey
-ptupName = varQual FSLIT("ptup") ptupIdKey
-pconName = varQual FSLIT("pcon") pconIdKey
-ptildeName = varQual FSLIT("ptilde") ptildeIdKey
-paspatName = varQual FSLIT("paspat") paspatIdKey
-pwildName = varQual FSLIT("pwild") pwildIdKey
-precName = varQual FSLIT("prec") precIdKey
-varName = varQual FSLIT("var") varIdKey
-conName = varQual FSLIT("con") conIdKey
-litName = varQual FSLIT("lit") litIdKey
-appName = varQual FSLIT("app") appIdKey
-infixEName = varQual FSLIT("infixE") infixEIdKey
-lamName = varQual FSLIT("lam") lamIdKey
-tupName = varQual FSLIT("tup") tupIdKey
-doEName = varQual FSLIT("doE") doEIdKey
-compName = varQual FSLIT("comp") compIdKey
-listExpName = varQual FSLIT("listExp") listExpIdKey
-sigExpName = varQual FSLIT("sigExp") sigExpIdKey
-condName = varQual FSLIT("cond") condIdKey
-letEName = varQual FSLIT("letE") letEIdKey
-caseEName = varQual FSLIT("caseE") caseEIdKey
-infixAppName = varQual FSLIT("infixApp") infixAppIdKey
-sectionLName = varQual FSLIT("sectionL") sectionLIdKey
-sectionRName = varQual FSLIT("sectionR") sectionRIdKey
-recConName = varQual FSLIT("recCon") recConIdKey
-recUpdName = varQual FSLIT("recUpd") recUpdIdKey
-guardedName = varQual FSLIT("guarded") guardedIdKey
-normalName = varQual FSLIT("normal") normalIdKey
-bindStName = varQual FSLIT("bindSt") bindStIdKey
-letStName = varQual FSLIT("letSt") letStIdKey
-noBindStName = varQual FSLIT("noBindSt") noBindStIdKey
-parStName = varQual FSLIT("parSt") parStIdKey
-fromName = varQual FSLIT("from") fromIdKey
-fromThenName = varQual FSLIT("fromThen") fromThenIdKey
-fromToName = varQual FSLIT("fromTo") fromToIdKey
-fromThenToName = varQual FSLIT("fromThenTo") fromThenToIdKey
-liftName = varQual FSLIT("lift") liftIdKey
-gensymName = varQual FSLIT("gensym") gensymIdKey
-returnQName = varQual FSLIT("returnQ") returnQIdKey
-bindQName = varQual FSLIT("bindQ") bindQIdKey
-sequenceQName = varQual FSLIT("sequenceQ") sequenceQIdKey
+
+templateHaskellNames = [
+ returnQName, bindQName, sequenceQName, newNameName, liftName,
+ mkNameName, mkNameG_vName, mkNameG_dName, mkNameG_tcName, mkNameUName,
+
+ -- Lit
+ charLName, stringLName, integerLName, intPrimLName,
+ floatPrimLName, doublePrimLName, rationalLName,
+ -- Pat
+ litPName, varPName, tupPName, conPName, tildePName,
+ asPName, wildPName, recPName, listPName,
+ -- FieldPat
+ fieldPatName,
+ -- Match
+ matchName,
+ -- Clause
+ clauseName,
+ -- Exp
+ varEName, conEName, litEName, appEName, infixEName,
+ infixAppName, sectionLName, sectionRName, lamEName, tupEName,
+ condEName, letEName, caseEName, doEName, compEName,
+ fromEName, fromThenEName, fromToEName, fromThenToEName,
+ listEName, sigEName, recConEName, recUpdEName,
+ -- FieldExp
+ fieldExpName,
+ -- Body
+ guardedBName, normalBName,
+ -- Stmt
+ bindSName, letSName, noBindSName, parSName,
+ -- Dec
+ funDName, valDName, dataDName, newtypeDName, tySynDName,
+ classDName, instanceDName, sigDName,
+ -- Cxt
+ cxtName,
+ -- Strict
+ isStrictName, notStrictName,
+ -- Con
+ normalCName, recCName, infixCName,
+ -- StrictType
+ strictTypeName,
+ -- VarStrictType
+ varStrictTypeName,
+ -- Type
+ forallTName, varTName, conTName, appTName,
+ tupleTName, arrowTName, listTName,
+
+ -- And the tycons
+ qTyConName, nameTyConName, patTyConName, fieldPatTyConName, matchQTyConName,
+ clauseQTyConName, expQTyConName, fieldExpTyConName, stmtQTyConName,
+ decQTyConName, conQTyConName, strictTypeQTyConName,
+ varStrictTypeQTyConName, typeQTyConName, expTyConName, decTyConName,
+ typeTyConName, matchTyConName, clauseTyConName]
+
+tH_SYN_Name = mkModuleName "Language.Haskell.TH.Syntax"
+tH_LIB_Name = mkModuleName "Language.Haskell.TH.Lib"
+
+thSyn :: Module
+-- NB: the TH.Syntax module comes from the "haskell-src" package
+thSyn = mkModule thPackage tH_SYN_Name
+thLib = mkModule thPackage tH_LIB_Name
+
+mk_known_key_name mod space str uniq
+ = mkExternalName uniq mod (mkOccFS space str)
+ Nothing noSrcLoc
+
+libFun = mk_known_key_name thLib OccName.varName
+libTc = mk_known_key_name thLib OccName.tcName
+thFun = mk_known_key_name thSyn OccName.varName
+thTc = mk_known_key_name thSyn OccName.tcName
+
+-------------------- TH.Syntax -----------------------
+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
+
+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
+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
+mkNameUName = thFun FSLIT("mkNameU") mkNameUIdKey
+
+
+-------------------- TH.Lib -----------------------
+-- data Lit = ...
+charLName = libFun FSLIT("charL") charLIdKey
+stringLName = libFun FSLIT("stringL") stringLIdKey
+integerLName = libFun FSLIT("integerL") integerLIdKey
+intPrimLName = libFun FSLIT("intPrimL") intPrimLIdKey
+floatPrimLName = libFun FSLIT("floatPrimL") floatPrimLIdKey
+doublePrimLName = libFun FSLIT("doublePrimL") doublePrimLIdKey
+rationalLName = libFun FSLIT("rationalL") rationalLIdKey
+
+-- data Pat = ...
+litPName = libFun FSLIT("litP") litPIdKey
+varPName = libFun FSLIT("varP") varPIdKey
+tupPName = libFun FSLIT("tupP") tupPIdKey
+conPName = libFun FSLIT("conP") conPIdKey
+tildePName = libFun FSLIT("tildeP") tildePIdKey
+asPName = libFun FSLIT("asP") asPIdKey
+wildPName = libFun FSLIT("wildP") wildPIdKey
+recPName = libFun FSLIT("recP") recPIdKey
+listPName = libFun FSLIT("listP") listPIdKey
+
+-- type FieldPat = ...
+fieldPatName = libFun FSLIT("fieldPat") fieldPatIdKey