-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Facilities for manipulating Haskell source code using Template -- Haskell. @package template-haskell -- | Abstract syntax definitions for Template Haskell. module Language.Haskell.TH.Syntax.Internals newtype ModName ModName :: String -> ModName newtype PkgName PkgName :: String -> PkgName newtype OccName OccName :: String -> OccName instance Typeable OccName instance Typeable PkgName instance Typeable ModName instance Eq OccName instance Ord OccName instance Data OccName instance Eq PkgName instance Ord PkgName instance Data PkgName instance Eq ModName instance Ord ModName instance Data ModName -- | Abstract syntax definitions for Template Haskell. module Language.Haskell.TH.Syntax class (Monad m, Functor m) => Quasi m qNewName :: Quasi m => String -> m Name qReport :: Quasi m => Bool -> String -> m () qRecover :: Quasi m => m a -> m a -> m a qReify :: Quasi m => Name -> m Info qLocation :: Quasi m => m Loc qRunIO :: Quasi m => IO a -> m a class Lift t lift :: Lift t => t -> Q Exp liftString :: String -> Q Exp data Q a runQ :: Quasi m => Q a -> m a report :: Bool -> String -> Q () recover :: Q a -> Q a -> Q a -- | reify looks up information about the Name reify :: Name -> Q Info -- | location gives you the Location at which this -- computation is spliced. location :: Q Loc -- | The runIO function lets you run an I/O computation in the -- Q monad. Take care: you are guaranteed the ordering of calls to -- runIO within a single Q computation, but not about the -- order in which splices are run. -- -- Note: for various murky reasons, stdout and stderr handles are not -- necesarily flushed when the compiler finishes running, so you should -- flush them yourself. runIO :: IO a -> Q a data Name Name :: OccName -> NameFlavour -> Name mkName :: String -> Name newName :: String -> Q Name nameBase :: Name -> String nameModule :: Name -> Maybe String showName :: Name -> String showName' :: NameIs -> Name -> String data NameIs Alone :: NameIs Applied :: NameIs Infix :: NameIs data Dec FunD :: Name -> [Clause] -> Dec ValD :: Pat -> Body -> [Dec] -> Dec DataD :: Cxt -> Name -> [TyVarBndr] -> [Con] -> [Name] -> Dec NewtypeD :: Cxt -> Name -> [TyVarBndr] -> Con -> [Name] -> Dec TySynD :: Name -> [TyVarBndr] -> Type -> Dec ClassD :: Cxt -> Name -> [TyVarBndr] -> [FunDep] -> [Dec] -> Dec InstanceD :: Cxt -> Type -> [Dec] -> Dec SigD :: Name -> Type -> Dec ForeignD :: Foreign -> Dec PragmaD :: Pragma -> Dec FamilyD :: FamFlavour -> Name -> [TyVarBndr] -> (Maybe Kind) -> Dec DataInstD :: Cxt -> Name -> [Type] -> [Con] -> [Name] -> Dec NewtypeInstD :: Cxt -> Name -> [Type] -> Con -> [Name] -> Dec TySynInstD :: Name -> [Type] -> Type -> Dec -- | The CompE constructor represents a list comprehension, and -- takes a [Stmt]. The result expression of the comprehension is -- the *last* of these, and should be a NoBindS. E.g. [ f x | x -- <- xs ] is represented by CompE [BindS (VarP x) (VarE xs), NoBindS -- (AppE (VarE f) (VarE x))] data Exp VarE :: Name -> Exp ConE :: Name -> Exp LitE :: Lit -> Exp AppE :: Exp -> Exp -> Exp InfixE :: (Maybe Exp) -> Exp -> (Maybe Exp) -> Exp LamE :: [Pat] -> Exp -> Exp TupE :: [Exp] -> Exp CondE :: Exp -> Exp -> Exp -> Exp LetE :: [Dec] -> Exp -> Exp CaseE :: Exp -> [Match] -> Exp DoE :: [Stmt] -> Exp CompE :: [Stmt] -> Exp ArithSeqE :: Range -> Exp ListE :: [Exp] -> Exp SigE :: Exp -> Type -> Exp RecConE :: Name -> [FieldExp] -> Exp RecUpdE :: Exp -> [FieldExp] -> Exp data Con NormalC :: Name -> [StrictType] -> Con RecC :: Name -> [VarStrictType] -> Con InfixC :: StrictType -> Name -> StrictType -> Con ForallC :: [TyVarBndr] -> Cxt -> Con -> Con data Type ForallT :: [TyVarBndr] -> Cxt -> Type -> Type VarT :: Name -> Type ConT :: Name -> Type TupleT :: Int -> Type ArrowT :: Type ListT :: Type AppT :: Type -> Type -> Type SigT :: Type -> Kind -> Type data TyVarBndr PlainTV :: Name -> TyVarBndr KindedTV :: Name -> Kind -> TyVarBndr data Kind StarK :: Kind ArrowK :: Kind -> Kind -> Kind type Cxt = [Pred] data Pred ClassP :: Name -> [Type] -> Pred EqualP :: Type -> Type -> Pred data Match Match :: Pat -> Body -> [Dec] -> Match data Clause Clause :: [Pat] -> Body -> [Dec] -> Clause data Body GuardedB :: [(Guard, Exp)] -> Body NormalB :: Exp -> Body data Guard NormalG :: Exp -> Guard PatG :: [Stmt] -> Guard data Stmt BindS :: Pat -> Exp -> Stmt LetS :: [Dec] -> Stmt NoBindS :: Exp -> Stmt ParS :: [[Stmt]] -> Stmt data Range FromR :: Exp -> Range FromThenR :: Exp -> Exp -> Range FromToR :: Exp -> Exp -> Range FromThenToR :: Exp -> Exp -> Exp -> Range data Lit CharL :: Char -> Lit StringL :: String -> Lit IntegerL :: Integer -> Lit RationalL :: Rational -> Lit IntPrimL :: Integer -> Lit WordPrimL :: Integer -> Lit FloatPrimL :: Rational -> Lit DoublePrimL :: Rational -> Lit data Pat LitP :: Lit -> Pat VarP :: Name -> Pat TupP :: [Pat] -> Pat ConP :: Name -> [Pat] -> Pat InfixP :: Pat -> Name -> Pat -> Pat TildeP :: Pat -> Pat BangP :: Pat -> Pat AsP :: Name -> Pat -> Pat WildP :: Pat RecP :: Name -> [FieldPat] -> Pat ListP :: [Pat] -> Pat SigP :: Pat -> Type -> Pat type FieldExp = (Name, Exp) type FieldPat = (Name, Pat) data Strict IsStrict :: Strict NotStrict :: Strict data Foreign ImportF :: Callconv -> Safety -> String -> Name -> Type -> Foreign ExportF :: Callconv -> String -> Name -> Type -> Foreign data Callconv CCall :: Callconv StdCall :: Callconv data Safety Unsafe :: Safety Safe :: Safety Threadsafe :: Safety data Pragma InlineP :: Name -> InlineSpec -> Pragma SpecialiseP :: Name -> Type -> (Maybe InlineSpec) -> Pragma data InlineSpec InlineSpec :: Bool -> Bool -> (Maybe (Bool, Int)) -> InlineSpec type StrictType = (Strict, Type) type VarStrictType = (Name, Strict, Type) data FunDep FunDep :: [Name] -> [Name] -> FunDep data FamFlavour TypeFam :: FamFlavour DataFam :: FamFlavour data Info ClassI :: Dec -> Info ClassOpI :: Name -> Type -> Name -> Fixity -> Info TyConI :: Dec -> Info PrimTyConI :: Name -> Int -> Bool -> Info DataConI :: Name -> Type -> Name -> Fixity -> Info VarI :: Name -> Type -> (Maybe Dec) -> Fixity -> Info TyVarI :: Name -> Type -> Info data Loc Loc :: String -> String -> String -> CharPos -> CharPos -> Loc loc_filename :: Loc -> String loc_package :: Loc -> String loc_module :: Loc -> String loc_start :: Loc -> CharPos loc_end :: Loc -> CharPos type CharPos = (Int, Int) data Fixity Fixity :: Int -> FixityDirection -> Fixity data FixityDirection InfixL :: FixityDirection InfixR :: FixityDirection InfixN :: FixityDirection defaultFixity :: Fixity maxPrecedence :: Int returnQ :: a -> Q a bindQ :: Q a -> (a -> Q b) -> Q b sequenceQ :: [Q a] -> Q [a] data NameFlavour NameS :: NameFlavour NameQ :: ModName -> NameFlavour NameU :: Int# -> NameFlavour NameL :: Int# -> NameFlavour NameG :: NameSpace -> PkgName -> ModName -> NameFlavour data NameSpace VarName :: NameSpace DataName :: NameSpace TcClsName :: NameSpace mkNameG_v :: String -> String -> String -> Name mkNameG_d :: String -> String -> String -> Name mkNameG_tc :: String -> String -> String -> Name type Uniq = Int mkNameL :: String -> Uniq -> Name mkNameU :: String -> Uniq -> Name tupleTypeName :: Int -> Name tupleDataName :: Int -> Name data OccName mkOccName :: String -> OccName occString :: OccName -> String data ModName mkModName :: String -> ModName modString :: ModName -> String data PkgName mkPkgName :: String -> PkgName pkgString :: PkgName -> String instance Typeable Kind instance Typeable TyVarBndr instance Typeable Type instance Typeable Con instance Typeable Strict instance Typeable Pred instance Typeable InlineSpec instance Typeable Pragma instance Typeable Safety instance Typeable Callconv instance Typeable Foreign instance Typeable FamFlavour instance Typeable FunDep instance Typeable Dec instance Typeable Range instance Typeable Stmt instance Typeable Guard instance Typeable Body instance Typeable Exp instance Typeable Clause instance Typeable Match instance Typeable Pat instance Typeable Lit instance Typeable FixityDirection instance Typeable Fixity instance Typeable Info instance Typeable NameSpace instance Typeable NameFlavour instance Typeable Name instance Show Kind instance Eq Kind instance Data Kind instance Show TyVarBndr instance Eq TyVarBndr instance Data TyVarBndr instance Show Type instance Eq Type instance Data Type instance Show Con instance Eq Con instance Data Con instance Show Strict instance Eq Strict instance Data Strict instance Show Pred instance Eq Pred instance Data Pred instance Show InlineSpec instance Eq InlineSpec instance Data InlineSpec instance Show Pragma instance Eq Pragma instance Data Pragma instance Show Safety instance Eq Safety instance Data Safety instance Show Callconv instance Eq Callconv instance Data Callconv instance Show Foreign instance Eq Foreign instance Data Foreign instance Show FamFlavour instance Eq FamFlavour instance Data FamFlavour instance Show FunDep instance Eq FunDep instance Data FunDep instance Show Dec instance Eq Dec instance Data Dec instance Show Range instance Eq Range instance Data Range instance Show Stmt instance Eq Stmt instance Data Stmt instance Show Guard instance Eq Guard instance Data Guard instance Show Body instance Eq Body instance Data Body instance Show Exp instance Eq Exp instance Data Exp instance Show Clause instance Eq Clause instance Data Clause instance Show Match instance Eq Match instance Data Match instance Show Pat instance Eq Pat instance Data Pat instance Show Lit instance Eq Lit instance Data Lit instance Eq FixityDirection instance Show FixityDirection instance Data FixityDirection instance Eq Fixity instance Show Fixity instance Data Fixity instance Show Info instance Data Info instance Eq NameSpace instance Ord NameSpace instance Data NameSpace instance Data Name instance Show Name instance Ord NameFlavour instance Eq NameFlavour instance Ord Name instance Eq Name instance Data NameFlavour instance (Lift a, Lift b, Lift c, Lift d, Lift e, Lift f, Lift g) => Lift (a, b, c, d, e, f, g) instance (Lift a, Lift b, Lift c, Lift d, Lift e, Lift f) => Lift (a, b, c, d, e, f) instance (Lift a, Lift b, Lift c, Lift d, Lift e) => Lift (a, b, c, d, e) instance (Lift a, Lift b, Lift c, Lift d) => Lift (a, b, c, d) instance (Lift a, Lift b, Lift c) => Lift (a, b, c) instance (Lift a, Lift b) => Lift (a, b) instance Lift a => Lift [a] instance (Lift a, Lift b) => Lift (Either a b) instance Lift a => Lift (Maybe a) instance Lift Bool instance Lift Char instance Lift Int instance Lift Integer instance Quasi Q instance Functor Q instance Monad Q instance Quasi IO module Language.Haskell.TH.Lib type InfoQ = Q Info type PatQ = Q Pat type FieldPatQ = Q FieldPat type ExpQ = Q Exp type DecQ = Q Dec type ConQ = Q Con type TypeQ = Q Type type CxtQ = Q Cxt type PredQ = Q Pred type MatchQ = Q Match type ClauseQ = Q Clause type BodyQ = Q Body type GuardQ = Q Guard type StmtQ = Q Stmt type RangeQ = Q Range type StrictTypeQ = Q StrictType type VarStrictTypeQ = Q VarStrictType type FieldExpQ = Q FieldExp type InlineSpecQ = Q InlineSpec intPrimL :: Integer -> Lit wordPrimL :: Integer -> Lit floatPrimL :: Rational -> Lit doublePrimL :: Rational -> Lit integerL :: Integer -> Lit charL :: Char -> Lit stringL :: String -> Lit rationalL :: Rational -> Lit litP :: Lit -> PatQ varP :: Name -> PatQ tupP :: [PatQ] -> PatQ conP :: Name -> [PatQ] -> PatQ infixP :: PatQ -> Name -> PatQ -> PatQ tildeP :: PatQ -> PatQ bangP :: PatQ -> PatQ asP :: Name -> PatQ -> PatQ wildP :: PatQ recP :: Name -> [FieldPatQ] -> PatQ listP :: [PatQ] -> PatQ sigP :: PatQ -> TypeQ -> PatQ fieldPat :: Name -> PatQ -> FieldPatQ bindS :: PatQ -> ExpQ -> StmtQ letS :: [DecQ] -> StmtQ noBindS :: ExpQ -> StmtQ parS :: [[StmtQ]] -> StmtQ fromR :: ExpQ -> RangeQ fromThenR :: ExpQ -> ExpQ -> RangeQ fromToR :: ExpQ -> ExpQ -> RangeQ fromThenToR :: ExpQ -> ExpQ -> ExpQ -> RangeQ normalB :: ExpQ -> BodyQ guardedB :: [Q (Guard, Exp)] -> BodyQ normalG :: ExpQ -> GuardQ normalGE :: ExpQ -> ExpQ -> Q (Guard, Exp) patG :: [StmtQ] -> GuardQ patGE :: [StmtQ] -> ExpQ -> Q (Guard, Exp) match :: PatQ -> BodyQ -> [DecQ] -> MatchQ clause :: [PatQ] -> BodyQ -> [DecQ] -> ClauseQ dyn :: String -> Q Exp global :: Name -> ExpQ varE :: Name -> ExpQ conE :: Name -> ExpQ litE :: Lit -> ExpQ appE :: ExpQ -> ExpQ -> ExpQ infixE :: Maybe ExpQ -> ExpQ -> Maybe ExpQ -> ExpQ infixApp :: ExpQ -> ExpQ -> ExpQ -> ExpQ sectionL :: ExpQ -> ExpQ -> ExpQ sectionR :: ExpQ -> ExpQ -> ExpQ lamE :: [PatQ] -> ExpQ -> ExpQ lam1E :: PatQ -> ExpQ -> ExpQ tupE :: [ExpQ] -> ExpQ condE :: ExpQ -> ExpQ -> ExpQ -> ExpQ letE :: [DecQ] -> ExpQ -> ExpQ caseE :: ExpQ -> [MatchQ] -> ExpQ doE :: [StmtQ] -> ExpQ compE :: [StmtQ] -> ExpQ arithSeqE :: RangeQ -> ExpQ fromE :: ExpQ -> ExpQ fromThenE :: ExpQ -> ExpQ -> ExpQ fromToE :: ExpQ -> ExpQ -> ExpQ fromThenToE :: ExpQ -> ExpQ -> ExpQ -> ExpQ listE :: [ExpQ] -> ExpQ sigE :: ExpQ -> TypeQ -> ExpQ recConE :: Name -> [Q (Name, Exp)] -> ExpQ recUpdE :: ExpQ -> [Q (Name, Exp)] -> ExpQ stringE :: String -> ExpQ fieldExp :: Name -> ExpQ -> Q (Name, Exp) valD :: PatQ -> BodyQ -> [DecQ] -> DecQ funD :: Name -> [ClauseQ] -> DecQ tySynD :: Name -> [TyVarBndr] -> TypeQ -> DecQ dataD :: CxtQ -> Name -> [TyVarBndr] -> [ConQ] -> [Name] -> DecQ newtypeD :: CxtQ -> Name -> [TyVarBndr] -> ConQ -> [Name] -> DecQ classD :: CxtQ -> Name -> [TyVarBndr] -> [FunDep] -> [DecQ] -> DecQ instanceD :: CxtQ -> TypeQ -> [DecQ] -> DecQ sigD :: Name -> TypeQ -> DecQ forImpD :: Callconv -> Safety -> String -> Name -> TypeQ -> DecQ pragInlD :: Name -> InlineSpecQ -> DecQ pragSpecD :: Name -> TypeQ -> DecQ pragSpecInlD :: Name -> TypeQ -> InlineSpecQ -> DecQ familyNoKindD :: FamFlavour -> Name -> [TyVarBndr] -> DecQ familyKindD :: FamFlavour -> Name -> [TyVarBndr] -> Kind -> DecQ dataInstD :: CxtQ -> Name -> [TypeQ] -> [ConQ] -> [Name] -> DecQ newtypeInstD :: CxtQ -> Name -> [TypeQ] -> ConQ -> [Name] -> DecQ tySynInstD :: Name -> [TypeQ] -> TypeQ -> DecQ cxt :: [PredQ] -> CxtQ classP :: Name -> [TypeQ] -> PredQ equalP :: TypeQ -> TypeQ -> PredQ normalC :: Name -> [StrictTypeQ] -> ConQ recC :: Name -> [VarStrictTypeQ] -> ConQ infixC :: Q (Strict, Type) -> Name -> Q (Strict, Type) -> ConQ forallC :: [TyVarBndr] -> CxtQ -> ConQ -> ConQ forallT :: [TyVarBndr] -> CxtQ -> TypeQ -> TypeQ varT :: Name -> TypeQ conT :: Name -> TypeQ appT :: TypeQ -> TypeQ -> TypeQ arrowT :: TypeQ listT :: TypeQ tupleT :: Int -> TypeQ sigT :: TypeQ -> Kind -> TypeQ notStrict :: Q Strict isStrict :: Q Strict strictType :: Q Strict -> TypeQ -> StrictTypeQ varStrictType :: Name -> StrictTypeQ -> VarStrictTypeQ plainTV :: Name -> TyVarBndr kindedTV :: Name -> Kind -> TyVarBndr starK :: Kind arrowK :: Kind -> Kind -> Kind stdCall :: Callconv cCall :: Callconv safe :: Safety threadsafe :: Safety unsafe :: Safety inlineSpecNoPhase :: Bool -> Bool -> InlineSpecQ inlineSpecPhase :: Bool -> Bool -> Bool -> Int -> InlineSpecQ funDep :: [Name] -> [Name] -> FunDep dataFam :: FamFlavour typeFam :: FamFlavour combine :: [([(Name, Name)], Pat)] -> ([(Name, Name)], [Pat]) rename :: Pat -> Q ([(Name, Name)], Pat) genpat :: Pat -> Q (Name -> ExpQ, Pat) alpha :: [(Name, Name)] -> Name -> ExpQ appsE :: [ExpQ] -> ExpQ simpleMatch :: Pat -> Exp -> Match module Language.Haskell.TH.Quote data QuasiQuoter QuasiQuoter :: (String -> Q Exp) -> (String -> Q Pat) -> QuasiQuoter quoteExp :: QuasiQuoter -> String -> Q Exp quotePat :: QuasiQuoter -> String -> Q Pat dataToQa :: Data a => (Name -> k) -> (Lit -> Q q) -> (k -> [Q q] -> Q q) -> (forall b. Data b => b -> Maybe (Q q)) -> a -> Q q -- | dataToExpQ converts a value to a 'Q Exp' representation of the -- same value. It takes a function to handle type-specific cases. dataToExpQ :: Data a => (forall b. Data b => b -> Maybe (Q Exp)) -> a -> Q Exp -- | dataToPatQ converts a value to a 'Q Pat' representation of the -- same value. It takes a function to handle type-specific cases. dataToPatQ :: Data a => (forall b. Data b => b -> Maybe (Q Pat)) -> a -> Q Pat module Language.Haskell.TH.PprLib type Doc = PprM Doc data PprM a -- | An empty document empty :: Doc -- | A ';' character semi :: Doc -- | A ',' character comma :: Doc -- | A : character colon :: Doc -- | A space character space :: Doc -- | A '=' character equals :: Doc -- | A '(' character lparen :: Doc -- | A ')' character rparen :: Doc -- | A '[' character lbrack :: Doc -- | A ']' character rbrack :: Doc -- | A '{' character lbrace :: Doc -- | A '}' character rbrace :: Doc text :: String -> Doc char :: Char -> Doc ptext :: String -> Doc int :: Int -> Doc integer :: Integer -> Doc float :: Float -> Doc double :: Double -> Doc rational :: Rational -> Doc -- | Wrap document in (...) parens :: Doc -> Doc -- | Wrap document in [...] brackets :: Doc -> Doc -- | Wrap document in {...} braces :: Doc -> Doc -- | Wrap document in '...' quotes :: Doc -> Doc -- | Wrap document in "..." doubleQuotes :: Doc -> Doc -- | Beside (<>) :: Doc -> Doc -> Doc -- | Beside, separated by space (<+>) :: Doc -> Doc -> Doc -- | List version of <> hcat :: [Doc] -> Doc -- | List version of <+> hsep :: [Doc] -> Doc -- | Above; if there is no overlap it "dovetails" the two ($$) :: Doc -> Doc -> Doc -- | Above, without dovetailing. ($+$) :: Doc -> Doc -> Doc -- | List version of $$ vcat :: [Doc] -> Doc -- | Either hsep or vcat sep :: [Doc] -> Doc -- | Either hcat or vcat cat :: [Doc] -> Doc -- | "Paragraph fill" version of sep fsep :: [Doc] -> Doc -- | "Paragraph fill" version of cat fcat :: [Doc] -> Doc -- | Nested nest :: Int -> Doc -> Doc -- |
--   hang d1 n d2 = sep [d1, nest n d2]
--   
hang :: Doc -> Int -> Doc -> Doc -- |
--   punctuate p [d1, ... dn] = [d1 <> p, d2 <> p, ... dn-1 <> p, dn]
--   
punctuate :: Doc -> [Doc] -> [Doc] -- | Returns True if the document is empty isEmpty :: Doc -> PprM Bool to_HPJ_Doc :: Doc -> Doc pprName :: Name -> Doc pprName' :: NameIs -> Name -> Doc instance Monad PprM instance Show Doc module Language.Haskell.TH.Ppr nestDepth :: Int type Precedence = Int opPrec :: Precedence noPrec :: Precedence appPrec :: Precedence parensIf :: Bool -> Doc -> Doc pprint :: Ppr a => a -> String class Ppr a ppr :: Ppr a => a -> Doc ppr_list :: Ppr a => [a] -> Doc ppr_sig :: Name -> Type -> Doc pprFixity :: Name -> Fixity -> Doc pprInfixExp :: Exp -> Doc pprExp :: Precedence -> Exp -> Doc pprFields :: [(Name, Exp)] -> Doc pprMaybeExp :: Precedence -> Maybe Exp -> Doc pprBody :: Bool -> Body -> Doc pprLit :: Precedence -> Lit -> Doc pprPat :: Precedence -> Pat -> Doc ppr_dec :: Bool -> Dec -> Doc ppr_data :: Doc -> Cxt -> Name -> Doc -> [Con] -> [Name] -> Doc ppr_newtype :: Doc -> Cxt -> Name -> Doc -> Con -> [Name] -> Doc ppr_tySyn :: Doc -> Name -> Doc -> Type -> Doc ppr_activation :: Maybe (Bool, Int) -> Doc pprVarStrictType :: (Name, Strict, Type) -> Doc pprStrictType :: (Strict, Type) -> Doc pprParendType :: Type -> Doc pprTyApp :: (Type, [Type]) -> Doc pprFunArgType :: Type -> Doc split :: Type -> (Type, [Type]) pprArrowArgKind :: Kind -> Doc pprCxt :: Cxt -> Doc where_clause :: [Dec] -> Doc showtextl :: Show a => a -> Doc instance Ppr Range instance Ppr Pred instance Ppr Kind instance Ppr TyVarBndr instance Ppr Type instance Ppr Con instance Ppr Clause instance Ppr Pragma instance Ppr Foreign instance Ppr FamFlavour instance Ppr FunDep instance Ppr Dec instance Ppr Pat instance Ppr Match instance Ppr Stmt instance Ppr Exp instance Ppr Info instance Ppr Name instance Ppr a => Ppr [a] module Language.Haskell.TH data Q a runQ :: Quasi m => Q a -> m a report :: Bool -> String -> Q () recover :: Q a -> Q a -> Q a -- | reify looks up information about the Name reify :: Name -> Q Info -- | location gives you the Location at which this -- computation is spliced. location :: Q Loc -- | The runIO function lets you run an I/O computation in the -- Q monad. Take care: you are guaranteed the ordering of calls to -- runIO within a single Q computation, but not about the -- order in which splices are run. -- -- Note: for various murky reasons, stdout and stderr handles are not -- necesarily flushed when the compiler finishes running, so you should -- flush them yourself. runIO :: IO a -> Q a data Name mkName :: String -> Name newName :: String -> Q Name nameBase :: Name -> String nameModule :: Name -> Maybe String tupleTypeName :: Int -> Name tupleDataName :: Int -> Name data Dec FunD :: Name -> [Clause] -> Dec ValD :: Pat -> Body -> [Dec] -> Dec DataD :: Cxt -> Name -> [TyVarBndr] -> [Con] -> [Name] -> Dec NewtypeD :: Cxt -> Name -> [TyVarBndr] -> Con -> [Name] -> Dec TySynD :: Name -> [TyVarBndr] -> Type -> Dec ClassD :: Cxt -> Name -> [TyVarBndr] -> [FunDep] -> [Dec] -> Dec InstanceD :: Cxt -> Type -> [Dec] -> Dec SigD :: Name -> Type -> Dec ForeignD :: Foreign -> Dec PragmaD :: Pragma -> Dec FamilyD :: FamFlavour -> Name -> [TyVarBndr] -> (Maybe Kind) -> Dec DataInstD :: Cxt -> Name -> [Type] -> [Con] -> [Name] -> Dec NewtypeInstD :: Cxt -> Name -> [Type] -> Con -> [Name] -> Dec TySynInstD :: Name -> [Type] -> Type -> Dec -- | The CompE constructor represents a list comprehension, and -- takes a [Stmt]. The result expression of the comprehension is -- the *last* of these, and should be a NoBindS. E.g. [ f x | x -- <- xs ] is represented by CompE [BindS (VarP x) (VarE xs), NoBindS -- (AppE (VarE f) (VarE x))] data Exp VarE :: Name -> Exp ConE :: Name -> Exp LitE :: Lit -> Exp AppE :: Exp -> Exp -> Exp InfixE :: (Maybe Exp) -> Exp -> (Maybe Exp) -> Exp LamE :: [Pat] -> Exp -> Exp TupE :: [Exp] -> Exp CondE :: Exp -> Exp -> Exp -> Exp LetE :: [Dec] -> Exp -> Exp CaseE :: Exp -> [Match] -> Exp DoE :: [Stmt] -> Exp CompE :: [Stmt] -> Exp ArithSeqE :: Range -> Exp ListE :: [Exp] -> Exp SigE :: Exp -> Type -> Exp RecConE :: Name -> [FieldExp] -> Exp RecUpdE :: Exp -> [FieldExp] -> Exp data Con NormalC :: Name -> [StrictType] -> Con RecC :: Name -> [VarStrictType] -> Con InfixC :: StrictType -> Name -> StrictType -> Con ForallC :: [TyVarBndr] -> Cxt -> Con -> Con data Type ForallT :: [TyVarBndr] -> Cxt -> Type -> Type VarT :: Name -> Type ConT :: Name -> Type TupleT :: Int -> Type ArrowT :: Type ListT :: Type AppT :: Type -> Type -> Type SigT :: Type -> Kind -> Type data TyVarBndr PlainTV :: Name -> TyVarBndr KindedTV :: Name -> Kind -> TyVarBndr data Kind StarK :: Kind ArrowK :: Kind -> Kind -> Kind type Cxt = [Pred] data Pred ClassP :: Name -> [Type] -> Pred EqualP :: Type -> Type -> Pred data Match Match :: Pat -> Body -> [Dec] -> Match data Clause Clause :: [Pat] -> Body -> [Dec] -> Clause data Body GuardedB :: [(Guard, Exp)] -> Body NormalB :: Exp -> Body data Guard NormalG :: Exp -> Guard PatG :: [Stmt] -> Guard data Stmt BindS :: Pat -> Exp -> Stmt LetS :: [Dec] -> Stmt NoBindS :: Exp -> Stmt ParS :: [[Stmt]] -> Stmt data Range FromR :: Exp -> Range FromThenR :: Exp -> Exp -> Range FromToR :: Exp -> Exp -> Range FromThenToR :: Exp -> Exp -> Exp -> Range data Lit CharL :: Char -> Lit StringL :: String -> Lit IntegerL :: Integer -> Lit RationalL :: Rational -> Lit IntPrimL :: Integer -> Lit WordPrimL :: Integer -> Lit FloatPrimL :: Rational -> Lit DoublePrimL :: Rational -> Lit data Pat LitP :: Lit -> Pat VarP :: Name -> Pat TupP :: [Pat] -> Pat ConP :: Name -> [Pat] -> Pat InfixP :: Pat -> Name -> Pat -> Pat TildeP :: Pat -> Pat BangP :: Pat -> Pat AsP :: Name -> Pat -> Pat WildP :: Pat RecP :: Name -> [FieldPat] -> Pat ListP :: [Pat] -> Pat SigP :: Pat -> Type -> Pat type FieldExp = (Name, Exp) type FieldPat = (Name, Pat) data Strict IsStrict :: Strict NotStrict :: Strict data Foreign ImportF :: Callconv -> Safety -> String -> Name -> Type -> Foreign ExportF :: Callconv -> String -> Name -> Type -> Foreign data Callconv CCall :: Callconv StdCall :: Callconv data Safety Unsafe :: Safety Safe :: Safety Threadsafe :: Safety data Pragma InlineP :: Name -> InlineSpec -> Pragma SpecialiseP :: Name -> Type -> (Maybe InlineSpec) -> Pragma data InlineSpec InlineSpec :: Bool -> Bool -> (Maybe (Bool, Int)) -> InlineSpec data FunDep FunDep :: [Name] -> [Name] -> FunDep data FamFlavour TypeFam :: FamFlavour DataFam :: FamFlavour data Info ClassI :: Dec -> Info ClassOpI :: Name -> Type -> Name -> Fixity -> Info TyConI :: Dec -> Info PrimTyConI :: Name -> Int -> Bool -> Info DataConI :: Name -> Type -> Name -> Fixity -> Info VarI :: Name -> Type -> (Maybe Dec) -> Fixity -> Info TyVarI :: Name -> Type -> Info data Loc Loc :: String -> String -> String -> CharPos -> CharPos -> Loc loc_filename :: Loc -> String loc_package :: Loc -> String loc_module :: Loc -> String loc_start :: Loc -> CharPos loc_end :: Loc -> CharPos data Fixity Fixity :: Int -> FixityDirection -> Fixity data FixityDirection InfixL :: FixityDirection InfixR :: FixityDirection InfixN :: FixityDirection defaultFixity :: Fixity maxPrecedence :: Int type InfoQ = Q Info type ExpQ = Q Exp type DecQ = Q Dec type ConQ = Q Con type TypeQ = Q Type type CxtQ = Q Cxt type PredQ = Q Pred type MatchQ = Q Match type ClauseQ = Q Clause type BodyQ = Q Body type GuardQ = Q Guard type StmtQ = Q Stmt type RangeQ = Q Range type StrictTypeQ = Q StrictType type VarStrictTypeQ = Q VarStrictType type PatQ = Q Pat type FieldPatQ = Q FieldPat type InlineSpecQ = Q InlineSpec intPrimL :: Integer -> Lit wordPrimL :: Integer -> Lit floatPrimL :: Rational -> Lit doublePrimL :: Rational -> Lit integerL :: Integer -> Lit rationalL :: Rational -> Lit charL :: Char -> Lit stringL :: String -> Lit litP :: Lit -> PatQ varP :: Name -> PatQ tupP :: [PatQ] -> PatQ conP :: Name -> [PatQ] -> PatQ infixP :: PatQ -> Name -> PatQ -> PatQ tildeP :: PatQ -> PatQ bangP :: PatQ -> PatQ asP :: Name -> PatQ -> PatQ wildP :: PatQ recP :: Name -> [FieldPatQ] -> PatQ listP :: [PatQ] -> PatQ sigP :: PatQ -> TypeQ -> PatQ fieldPat :: Name -> PatQ -> FieldPatQ bindS :: PatQ -> ExpQ -> StmtQ letS :: [DecQ] -> StmtQ noBindS :: ExpQ -> StmtQ parS :: [[StmtQ]] -> StmtQ fromR :: ExpQ -> RangeQ fromThenR :: ExpQ -> ExpQ -> RangeQ fromToR :: ExpQ -> ExpQ -> RangeQ fromThenToR :: ExpQ -> ExpQ -> ExpQ -> RangeQ normalB :: ExpQ -> BodyQ guardedB :: [Q (Guard, Exp)] -> BodyQ normalG :: ExpQ -> GuardQ normalGE :: ExpQ -> ExpQ -> Q (Guard, Exp) patG :: [StmtQ] -> GuardQ patGE :: [StmtQ] -> ExpQ -> Q (Guard, Exp) match :: PatQ -> BodyQ -> [DecQ] -> MatchQ clause :: [PatQ] -> BodyQ -> [DecQ] -> ClauseQ dyn :: String -> Q Exp global :: Name -> ExpQ varE :: Name -> ExpQ conE :: Name -> ExpQ litE :: Lit -> ExpQ appE :: ExpQ -> ExpQ -> ExpQ infixE :: Maybe ExpQ -> ExpQ -> Maybe ExpQ -> ExpQ infixApp :: ExpQ -> ExpQ -> ExpQ -> ExpQ sectionL :: ExpQ -> ExpQ -> ExpQ sectionR :: ExpQ -> ExpQ -> ExpQ lamE :: [PatQ] -> ExpQ -> ExpQ lam1E :: PatQ -> ExpQ -> ExpQ tupE :: [ExpQ] -> ExpQ condE :: ExpQ -> ExpQ -> ExpQ -> ExpQ letE :: [DecQ] -> ExpQ -> ExpQ caseE :: ExpQ -> [MatchQ] -> ExpQ doE :: [StmtQ] -> ExpQ compE :: [StmtQ] -> ExpQ arithSeqE :: RangeQ -> ExpQ appsE :: [ExpQ] -> ExpQ fromE :: ExpQ -> ExpQ fromThenE :: ExpQ -> ExpQ -> ExpQ fromToE :: ExpQ -> ExpQ -> ExpQ fromThenToE :: ExpQ -> ExpQ -> ExpQ -> ExpQ listE :: [ExpQ] -> ExpQ sigE :: ExpQ -> TypeQ -> ExpQ recConE :: Name -> [Q (Name, Exp)] -> ExpQ recUpdE :: ExpQ -> [Q (Name, Exp)] -> ExpQ stringE :: String -> ExpQ fieldExp :: Name -> ExpQ -> Q (Name, Exp) valD :: PatQ -> BodyQ -> [DecQ] -> DecQ funD :: Name -> [ClauseQ] -> DecQ tySynD :: Name -> [TyVarBndr] -> TypeQ -> DecQ dataD :: CxtQ -> Name -> [TyVarBndr] -> [ConQ] -> [Name] -> DecQ newtypeD :: CxtQ -> Name -> [TyVarBndr] -> ConQ -> [Name] -> DecQ classD :: CxtQ -> Name -> [TyVarBndr] -> [FunDep] -> [DecQ] -> DecQ instanceD :: CxtQ -> TypeQ -> [DecQ] -> DecQ sigD :: Name -> TypeQ -> DecQ forImpD :: Callconv -> Safety -> String -> Name -> TypeQ -> DecQ pragInlD :: Name -> InlineSpecQ -> DecQ pragSpecD :: Name -> TypeQ -> DecQ familyNoKindD :: FamFlavour -> Name -> [TyVarBndr] -> DecQ familyKindD :: FamFlavour -> Name -> [TyVarBndr] -> Kind -> DecQ dataInstD :: CxtQ -> Name -> [TypeQ] -> [ConQ] -> [Name] -> DecQ newtypeInstD :: CxtQ -> Name -> [TypeQ] -> ConQ -> [Name] -> DecQ tySynInstD :: Name -> [TypeQ] -> TypeQ -> DecQ cxt :: [PredQ] -> CxtQ classP :: Name -> [TypeQ] -> PredQ equalP :: TypeQ -> TypeQ -> PredQ normalC :: Name -> [StrictTypeQ] -> ConQ recC :: Name -> [VarStrictTypeQ] -> ConQ infixC :: Q (Strict, Type) -> Name -> Q (Strict, Type) -> ConQ forallT :: [TyVarBndr] -> CxtQ -> TypeQ -> TypeQ varT :: Name -> TypeQ conT :: Name -> TypeQ appT :: TypeQ -> TypeQ -> TypeQ arrowT :: TypeQ listT :: TypeQ tupleT :: Int -> TypeQ sigT :: TypeQ -> Kind -> TypeQ isStrict :: Q Strict notStrict :: Q Strict strictType :: Q Strict -> TypeQ -> StrictTypeQ varStrictType :: Name -> StrictTypeQ -> VarStrictTypeQ cCall :: Callconv stdCall :: Callconv unsafe :: Safety safe :: Safety threadsafe :: Safety inlineSpecNoPhase :: Bool -> Bool -> InlineSpecQ inlineSpecPhase :: Bool -> Bool -> Bool -> Int -> InlineSpecQ typeFam :: FamFlavour dataFam :: FamFlavour class Ppr a ppr :: Ppr a => a -> Doc ppr_list :: Ppr a => [a] -> Doc pprint :: Ppr a => a -> String pprExp :: Precedence -> Exp -> Doc pprLit :: Precedence -> Lit -> Doc pprPat :: Precedence -> Pat -> Doc pprParendType :: Type -> Doc