Format most comments for haddock.
[ghc.git] / libraries / template-haskell / Language / Haskell / TH.hs
1 {- | The public face of Template Haskell
2
3 For other documentation, refer to:
4 <http://www.haskell.org/haskellwiki/Template_Haskell>
5
6 -}
7 module Language.Haskell.TH(
8 -- * The monad and its operations
9 Q, runQ,
10 report, -- :: Bool -> String -> Q ()
11 recover, -- :: Q a -> Q a -> Q a
12 reify, -- :: Name -> Q Info
13 location, -- :: Q Location
14 runIO, -- :: IO a -> Q a
15
16 -- * Names
17 Name,
18 mkName, -- :: String -> Name
19 newName, -- :: String -> Q Name
20 nameBase, -- :: Name -> String
21 nameModule, -- :: Name -> Maybe String
22 tupleTypeName, tupleDataName, -- Int -> Name
23
24 -- * The algebraic data types
25 -- | The lowercase versions (/syntax operators/) of these constructors are
26 -- preferred to these constructors, since they compose better with
27 -- quotations (@[| |]@) and splices (@$( ... )@)
28 Dec(..), Exp(..), Con(..), Type(..), TyVarBndr(..), Kind(..), Cxt,
29 Pred(..), Match(..), Clause(..), Body(..), Guard(..), Stmt(..),
30 Range(..), Lit(..), Pat(..), FieldExp, FieldPat,
31 Strict(..), Foreign(..), Callconv(..), Safety(..), Pragma(..),
32 InlineSpec(..), FunDep(..), FamFlavour(..), Info(..), Loc(..),
33 Fixity(..), FixityDirection(..), defaultFixity, maxPrecedence,
34
35 -- * Library functions
36 -- ** Abbreviations
37 InfoQ, ExpQ, DecQ, ConQ, TypeQ, CxtQ, PredQ, MatchQ, ClauseQ, BodyQ,
38 GuardQ, StmtQ, RangeQ, StrictTypeQ, VarStrictTypeQ, PatQ, FieldPatQ,
39 InlineSpecQ,
40
41 -- ** Constructors lifted to 'Q'
42 -- *** Litterals
43 intPrimL, wordPrimL, floatPrimL, doublePrimL, integerL, rationalL,
44 charL, stringL,
45 -- *** Patterns
46 litP, varP, tupP, conP, infixP, tildeP, bangP, asP, wildP, recP,
47 listP, sigP,
48 fieldPat,
49
50 -- *** Pattern Guards
51 normalB, guardedB, normalG, normalGE, patG, patGE, match, clause,
52
53 -- *** Expressions
54 dyn, global, varE, conE, litE, appE, infixE, infixApp, sectionL, sectionR,
55 lamE, lam1E, tupE, condE, letE, caseE, appsE,
56 listE, sigE, recConE, recUpdE, stringE, fieldExp,
57 -- **** Ranges
58 fromE, fromThenE, fromToE, fromThenToE,
59
60 -- ***** Ranges with more indirection
61 arithSeqE,
62 fromR, fromThenR, fromToR, fromThenToR,
63 -- **** Statements
64 doE, compE,
65 bindS, letS, noBindS, parS,
66
67 -- *** Types
68 forallT, varT, conT, appT, arrowT, listT, tupleT, sigT,
69 -- **** Strictness
70 isStrict, notStrict, strictType, varStrictType,
71 -- **** Class Contexts
72 cxt, classP, equalP, normalC, recC, infixC,
73
74 -- *** Top Level Declarations
75 -- **** Data
76 valD, funD, tySynD, dataD, newtypeD,
77 -- **** Class
78 classD, instanceD, sigD,
79 -- **** Type Family / Data Family
80 familyNoKindD, familyKindD, dataInstD,
81 newtypeInstD, tySynInstD,
82 typeFam, dataFam,
83 -- **** Foreign Function Interface (FFI)
84 cCall, stdCall, unsafe, safe, threadsafe, forImpD,
85 -- **** Pragmas
86 -- | Just inline supported so far
87 inlineSpecNoPhase, inlineSpecPhase,
88 pragInlD, pragSpecD,
89
90 -- * Pretty-printer
91 Ppr(..), pprint, pprExp, pprLit, pprPat, pprParendType
92
93 ) where
94
95 import Language.Haskell.TH.Syntax
96 import Language.Haskell.TH.Lib
97 import Language.Haskell.TH.Ppr
98