summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2016-12-17 18:08:36 -0500
committerBen Gamari <ben@smart-cactus.org>2016-12-17 18:09:40 -0500
commit343b1473fa3ad1f90e4f9708dbc4d8127382dc36 (patch)
tree813c27841ce089f5fb58f40a9228acd9ceb53403
parent2d1beb1ec84c2d22c6be83944ef4ea8626abd76a (diff)
downloadhaskell-343b1473fa3ad1f90e4f9708dbc4d8127382dc36.tar.gz
Reexport Language.Haskell.TH.Lib from Language.Haskell.TH
Reexporting `Language.Haskell.TH.Lib` from `Language.Haskell.TH` ensures that `Language.Haskell.TH` will continue to expose all of the functions that `Language.Haskell.TH.Lib` does in the future. Fixes #12992. Test Plan: ./validate Reviewers: austin, bgamari, goldfire Reviewed By: bgamari, goldfire Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2867 GHC Trac Issues: #12992
-rw-r--r--libraries/template-haskell/Language/Haskell/TH.hs85
-rw-r--r--libraries/template-haskell/Language/Haskell/TH/Lib.hs104
-rw-r--r--libraries/template-haskell/changelog.md11
3 files changed, 115 insertions, 85 deletions
diff --git a/libraries/template-haskell/Language/Haskell/TH.hs b/libraries/template-haskell/Language/Haskell/TH.hs
index bde698eaa3..5a497936ae 100644
--- a/libraries/template-haskell/Language/Haskell/TH.hs
+++ b/libraries/template-haskell/Language/Haskell/TH.hs
@@ -20,7 +20,6 @@ module Language.Haskell.TH(
-- *** Reify
reify, -- :: Name -> Q Info
reifyModule,
- thisModule,
Info(..), ModuleInfo(..),
InstanceDec,
ParentName,
@@ -84,89 +83,7 @@ module Language.Haskell.TH(
FamilyResultSig(..), Syntax.InjectivityAnn(..), PatSynType,
-- * Library functions
- -- ** Abbreviations
- InfoQ, ExpQ, DecQ, DecsQ, ConQ, TypeQ, TyLitQ, CxtQ, PredQ,
- DerivClauseQ, MatchQ, ClauseQ, BodyQ, GuardQ, StmtQ, RangeQ,
- SourceStrictnessQ, SourceUnpackednessQ, BangTypeQ, VarBangTypeQ,
- StrictTypeQ, VarStrictTypeQ, PatQ, FieldPatQ, RuleBndrQ, TySynEqnQ,
- PatSynDirQ, PatSynArgsQ,
-
- -- ** Constructors lifted to 'Q'
- -- *** Literals
- intPrimL, wordPrimL, floatPrimL, doublePrimL, integerL, rationalL,
- charL, stringL, stringPrimL, charPrimL,
- -- *** Patterns
- litP, varP, tupP, unboxedSumP, conP, uInfixP, parensP, infixP,
- tildeP, bangP, asP, wildP, recP,
- listP, sigP, viewP,
- fieldPat,
-
- -- *** Pattern Guards
- normalB, guardedB, normalG, normalGE, patG, patGE, match, clause,
-
- -- *** Expressions
- dyn, varE, conE, litE, appE, appTypeE, uInfixE, parensE, staticE,
- infixE, infixApp, sectionL, sectionR,
- lamE, lam1E, lamCaseE, tupE, unboxedSumE, condE, multiIfE, letE, caseE,
- appsE, listE, sigE, recConE, recUpdE, stringE, fieldExp,
- -- **** Ranges
- fromE, fromThenE, fromToE, fromThenToE,
-
- -- ***** Ranges with more indirection
- arithSeqE,
- fromR, fromThenR, fromToR, fromThenToR,
- -- **** Statements
- doE, compE,
- bindS, letS, noBindS, parS,
-
- -- *** Types
- forallT, varT, conT, appT, arrowT, infixT, uInfixT, parensT, equalityT,
- listT, tupleT, unboxedSumT, sigT, litT, promotedT, promotedTupleT,
- promotedNilT, promotedConsT,
- -- **** Type literals
- numTyLit, strTyLit,
- -- **** Strictness
- noSourceUnpackedness, sourceNoUnpack, sourceUnpack,
- noSourceStrictness, sourceLazy, sourceStrict,
- isStrict, notStrict, unpacked,
- bang, bangType, varBangType, strictType, varStrictType,
- -- **** Class Contexts
- cxt, classP, equalP,
- -- **** Constructors
- normalC, recC, infixC, forallC, gadtC, recGadtC,
-
- -- *** Kinds
- varK, conK, tupleK, arrowK, listK, appK, starK, constraintK,
-
- -- *** Roles
- nominalR, representationalR, phantomR, inferR,
-
- -- *** Top Level Declarations
- -- **** Data
- valD, funD, tySynD, dataD, newtypeD,
- derivClause, DerivClause(..), DerivStrategy(..),
- -- **** Class
- classD, instanceD, instanceWithOverlapD, Overlap(..),
- sigD, standaloneDerivD, standaloneDerivWithStrategyD, defaultSigD,
-
- -- **** Role annotations
- roleAnnotD,
- -- **** Type Family / Data Family
- dataFamilyD, openTypeFamilyD, closedTypeFamilyD, dataInstD,
- familyNoKindD, familyKindD, closedTypeFamilyNoKindD, closedTypeFamilyKindD,
- newtypeInstD, tySynInstD,
- typeFam, dataFam, tySynEqn, injectivityAnn, noSig, kindSig, tyVarSig,
- -- **** Foreign Function Interface (FFI)
- cCall, stdCall, cApi, prim, javaScript,
- unsafe, safe, forImpD,
- -- **** Pragmas
- ruleVar, typedRuleVar,
- pragInlD, pragSpecD, pragSpecInlD, pragSpecInstD, pragRuleD, pragAnnD,
- pragLineD,
-
- -- **** Pattern Synonyms
- patSynD, patSynSigD, unidir, implBidir, explBidir, prefixPatSyn,
- infixPatSyn, recordPatSyn,
+ module Language.Haskell.TH.Lib,
-- * Pretty-printer
Ppr(..), pprint, pprExp, pprLit, pprPat, pprParendType
diff --git a/libraries/template-haskell/Language/Haskell/TH/Lib.hs b/libraries/template-haskell/Language/Haskell/TH/Lib.hs
index c42543863d..0aa76204b1 100644
--- a/libraries/template-haskell/Language/Haskell/TH/Lib.hs
+++ b/libraries/template-haskell/Language/Haskell/TH/Lib.hs
@@ -4,11 +4,113 @@
{-# LANGUAGE CPP #-}
-module Language.Haskell.TH.Lib where
+module Language.Haskell.TH.Lib (
-- All of the exports from this module should
-- be "public" functions. The main module TH
-- re-exports them all.
+ -- * Library functions
+ -- ** Abbreviations
+ InfoQ, ExpQ, TExpQ, DecQ, DecsQ, ConQ, TypeQ, TyLitQ, CxtQ, PredQ,
+ DerivClauseQ, MatchQ, ClauseQ, BodyQ, GuardQ, StmtQ, RangeQ,
+ SourceStrictnessQ, SourceUnpackednessQ, BangQ, BangTypeQ, VarBangTypeQ,
+ StrictTypeQ, VarStrictTypeQ, FieldExpQ, PatQ, FieldPatQ, RuleBndrQ,
+ TySynEqnQ, PatSynDirQ, PatSynArgsQ,
+
+ -- ** Constructors lifted to 'Q'
+ -- *** Literals
+ intPrimL, wordPrimL, floatPrimL, doublePrimL, integerL, rationalL,
+ charL, stringL, stringPrimL, charPrimL,
+ -- *** Patterns
+ litP, varP, tupP, unboxedTupP, unboxedSumP, conP, uInfixP, parensP,
+ infixP, tildeP, bangP, asP, wildP, recP,
+ listP, sigP, viewP,
+ fieldPat,
+
+ -- *** Pattern Guards
+ normalB, guardedB, normalG, normalGE, patG, patGE, match, clause,
+
+ -- *** Expressions
+ dyn, varE, unboundVarE, conE, litE, appE, appTypeE, uInfixE, parensE,
+ staticE, infixE, infixApp, sectionL, sectionR,
+ lamE, lam1E, lamCaseE, tupE, unboxedTupE, unboxedSumE, condE, multiIfE,
+ letE, caseE, appsE, listE, sigE, recConE, recUpdE, stringE, fieldExp,
+ -- **** Ranges
+ fromE, fromThenE, fromToE, fromThenToE,
+
+ -- ***** Ranges with more indirection
+ arithSeqE,
+ fromR, fromThenR, fromToR, fromThenToR,
+ -- **** Statements
+ doE, compE,
+ bindS, letS, noBindS, parS,
+
+ -- *** Types
+ forallT, varT, conT, appT, arrowT, infixT, uInfixT, parensT, equalityT,
+ listT, tupleT, unboxedTupleT, unboxedSumT, sigT, litT, wildCardT,
+ promotedT, promotedTupleT, promotedNilT, promotedConsT,
+ -- **** Type literals
+ numTyLit, strTyLit,
+ -- **** Strictness
+ noSourceUnpackedness, sourceNoUnpack, sourceUnpack,
+ noSourceStrictness, sourceLazy, sourceStrict,
+ isStrict, notStrict, unpacked,
+ bang, bangType, varBangType, strictType, varStrictType,
+ -- **** Class Contexts
+ cxt, classP, equalP,
+ -- **** Constructors
+ normalC, recC, infixC, forallC, gadtC, recGadtC,
+
+ -- *** Kinds
+ varK, conK, tupleK, arrowK, listK, appK, starK, constraintK,
+
+ -- *** Type variable binders
+ plainTV, kindedTV,
+
+ -- *** Roles
+ nominalR, representationalR, phantomR, inferR,
+
+ -- *** Top Level Declarations
+ -- **** Data
+ valD, funD, tySynD, dataD, newtypeD,
+ derivClause, DerivClause(..), DerivStrategy(..),
+ -- **** Class
+ classD, instanceD, instanceWithOverlapD, Overlap(..),
+ sigD, standaloneDerivD, standaloneDerivWithStrategyD, defaultSigD,
+
+ -- **** Role annotations
+ roleAnnotD,
+ -- **** Type Family / Data Family
+ dataFamilyD, openTypeFamilyD, closedTypeFamilyD, dataInstD,
+ familyNoKindD, familyKindD, closedTypeFamilyNoKindD, closedTypeFamilyKindD,
+ newtypeInstD, tySynInstD,
+ typeFam, dataFam, tySynEqn, injectivityAnn, noSig, kindSig, tyVarSig,
+
+ -- **** Fixity
+ infixLD, infixRD, infixND,
+
+ -- **** Foreign Function Interface (FFI)
+ cCall, stdCall, cApi, prim, javaScript,
+ unsafe, safe, interruptible, forImpD,
+
+ -- **** Functional dependencies
+ funDep,
+
+ -- **** Pragmas
+ ruleVar, typedRuleVar,
+ valueAnnotation, typeAnnotation, moduleAnnotation,
+ pragInlD, pragSpecD, pragSpecInlD, pragSpecInstD, pragRuleD, pragAnnD,
+ pragLineD,
+
+ -- **** Pattern Synonyms
+ patSynD, patSynSigD, unidir, implBidir, explBidir, prefixPatSyn,
+ infixPatSyn, recordPatSyn,
+
+ -- ** Reify
+ thisModule
+
+ ) where
+
import Language.Haskell.TH.Syntax hiding (Role, InjectivityAnn)
import qualified Language.Haskell.TH.Syntax as TH
import Control.Monad( liftM, liftM2 )
diff --git a/libraries/template-haskell/changelog.md b/libraries/template-haskell/changelog.md
index 1f41a6a528..adf9365ed0 100644
--- a/libraries/template-haskell/changelog.md
+++ b/libraries/template-haskell/changelog.md
@@ -19,6 +19,17 @@
* `unboxedTupleTypeName` and `unboxedTupleDataName` now work for unboxed
0-tuples and 1-tuples (#12977)
+ * `Language.Haskell.TH` now reexports all of `Language.Haskell.TH.Lib`.
+ (#12992). This causes `Language.Haskell.TH` to export more types and
+ functions that it did before:
+ - `TExp`, `BangQ`, and `FieldExpQ`
+ - `unboxedTupP`, `unboxedTupE` and `unboundVarE`
+ - `infixLD`, `infixRD`, and `infixND`
+ - `unboxedTupleT` and `wildCardT`
+ - `plainTV` and `kindedTV`
+ - `interruptible` and `funDep`
+ - `valueAnnotation`, `typeAnnotation`, and `moduleAnnotation`
+
## 2.11.0.0 *May 2016*
* Bundled with GHC 8.0.1