Commit 343b1473 authored by Ryan Scott's avatar Ryan Scott Committed by Ben Gamari

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
parent 2d1beb1e
......@@ -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
......
......@@ -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 )
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment