haskell-src-meta-0.8.15: Parse source to template-haskell abstract syntax.

Copyright | (c) Matt Morrow 2008
License | BSD3
Maintainer | Matt Morrow <mjm2002@gmail.com>
Stability | experimental
Portability | portable (template-haskell)
Safe Haskell | None
Language | Haskell2010

Language.Haskell.Meta.Syntax.Translate

Description

# Documentation

moduleName :: String Source #

type DerivClause = DerivClause Source #

class ToName a where Source #

Methods

toName :: a -> Name Source #

#### Instances

Instances details

ToName Name Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toName :: Name -> Name Source #
ToName String Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toName :: String -> Name Source #
ToName (DeclHead l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toName :: DeclHead l -> Name Source #
ToName (MaybePromotedName l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toName :: MaybePromotedName l -> Name Source #
ToName (Name l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toName :: Name l -> Name Source #
ToName (Op l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toName :: Op l -> Name Source #
ToName (QName l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toName :: QName l -> Name Source #
ToName (SpecialCon l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toName :: SpecialCon l -> Name Source #
ToName (TyVarBind l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toName :: TyVarBind l -> Name Source #
ToName (TyVarBndr_ flag) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toName :: TyVarBndr_ flag -> Name Source #

class ToNames a where Source #

Methods

toNames :: a -> [Name] Source #

#### Instances

Instances details

ToNames (Deriving l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toNames :: Deriving l -> [Name] Source #
ToNames (InstHead l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toNames :: InstHead l -> [Name] Source #
ToNames (InstRule l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toNames :: InstRule l -> [Name] Source #
ToNames a => ToNames (Maybe a) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toNames :: Maybe a -> [Name] Source #

class ToLit a where Source #

Methods

toLit :: a -> Lit Source #

#### Instances

Instances details

ToLit Integer Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toLit :: Integer -> Lit Source #
ToLit String Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toLit :: String -> Lit Source #
ToLit Char Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toLit :: Char -> Lit Source #
ToLit Double Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toLit :: Double -> Lit Source #
ToLit Float Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toLit :: Float -> Lit Source #
ToLit Int Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toLit :: Int -> Lit Source #
ToLit (Literal l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toLit :: Literal l -> Lit Source #

class ToType a where Source #

Methods

toType :: a -> Type Source #

#### Instances

Instances details

ToType (InstHead l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toType :: InstHead l -> Type Source #
ToType (InstRule l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toType :: InstRule l -> Type Source #
ToType (QName l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toType :: QName l -> Type Source #
ToType (Type l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toType :: Type l -> Type Source #

class ToPat a where Source #

Methods

toPat :: a -> Pat Source #

#### Instances

Instances details

ToPat Lit Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toPat :: Lit -> Pat Source #
ToPat (Pat l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toPat :: Pat l -> Pat Source #
ToPat a => ToPat [a] Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toPat :: [a] -> Pat Source #
(ToPat a, ToPat b) => ToPat (a, b) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toPat :: (a, b) -> Pat Source #
(ToPat a, ToPat b, ToPat c) => ToPat (a, b, c) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toPat :: (a, b, c) -> Pat Source #
(ToPat a, ToPat b, ToPat c, ToPat d) => ToPat (a, b, c, d) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toPat :: (a, b, c, d) -> Pat Source #

class ToExp a where Source #

Methods

toExp :: a -> Exp Source #

#### Instances

Instances details

ToExp Lit Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toExp :: Lit -> Exp Source #
ToExp (Exp l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toExp :: Exp l -> Exp Source #
ToExp (QOp l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toExp :: QOp l -> Exp Source #
ToExp a => ToExp [a] Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toExp :: [a] -> Exp Source #
(ToExp a, ToExp b) => ToExp (a, b) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toExp :: (a, b) -> Exp Source #
(ToExp a, ToExp b, ToExp c) => ToExp (a, b, c) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toExp :: (a, b, c) -> Exp Source #
(ToExp a, ToExp b, ToExp c, ToExp d) => ToExp (a, b, c, d) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toExp :: (a, b, c, d) -> Exp Source #

class ToDecs a where Source #

Methods

toDecs :: a -> [Dec] Source #

#### Instances

Instances details

ToDecs (Binds l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toDecs :: Binds l -> [Dec] Source #
ToDecs (ClassDecl l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toDecs :: ClassDecl l -> [Dec] Source #
ToDecs (Decl l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toDecs :: Decl l -> [Dec] Source #
ToDecs (InstDecl l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toDecs :: InstDecl l -> [Dec] Source #
ToDecs a => ToDecs (Maybe a) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toDecs :: Maybe a -> [Dec] Source #
ToDecs a => ToDecs [a] Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toDecs :: [a] -> [Dec] Source #

class ToDec a where Source #

Methods

toDec :: a -> Dec Source #

#### Instances

Instances details

ToDec (Decl l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toDec :: Decl l -> Dec Source #

class ToStmt a where Source #

Methods

toStmt :: a -> Stmt Source #

#### Instances

Instances details

ToStmt (Stmt l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toStmt :: Stmt l -> Stmt Source #

class ToLoc a where Source #

Methods

toLoc :: a -> Loc Source #

#### Instances

Instances details

ToLoc SrcLoc Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toLoc :: SrcLoc -> Loc Source #

class ToCxt a where Source #

Methods

toCxt :: a -> Cxt Source #

#### Instances

Instances details

ToCxt (Context l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toCxt :: Context l -> Cxt Source #
ToCxt (InstRule l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toCxt :: InstRule l -> Cxt Source #
ToCxt a => ToCxt (Maybe a) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toCxt :: Maybe a -> Cxt Source #

class ToPred a where Source #

Methods

toPred :: a -> Pred Source #

#### Instances

Instances details

ToPred (Asst l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toPred :: Asst l -> Pred Source #

class ToTyVars a where Source #

Methods

toTyVars :: a -> [TyVarBndr_ ()] Source #

#### Instances

Instances details

ToTyVars (DeclHead l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toTyVars :: DeclHead l -> [TyVarBndr_ ()] Source #
ToTyVars (TyVarBind l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toTyVars :: TyVarBind l -> [TyVarBndr_ ()] Source #
ToTyVars a => ToTyVars (Maybe a) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toTyVars :: Maybe a -> [TyVarBndr_ ()] Source #
ToTyVars a => ToTyVars [a] Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toTyVars :: [a] -> [TyVarBndr_ ()] Source #

class ToMaybeKind a where Source #

Methods

toMaybeKind :: a -> Maybe Kind Source #

#### Instances

Instances details

ToMaybeKind (ResultSig l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toMaybeKind :: ResultSig l -> Maybe Kind Source #
ToMaybeKind a => ToMaybeKind (Maybe a) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toMaybeKind :: Maybe a -> Maybe Kind Source #

class ToInjectivityAnn a where Source #

Methods

toInjectivityAnn :: a -> InjectivityAnn Source #

#### Instances

Instances details

ToInjectivityAnn (InjectivityInfo l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toInjectivityAnn :: InjectivityInfo l -> InjectivityAnn Source #

class ToDerivClauses a where Source #

Methods

toDerivClauses :: a -> [DerivClause] Source #

#### Instances

Instances details

ToDerivClauses (Deriving l) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toDerivClauses :: Deriving l -> [DerivClause] Source #
ToDerivClauses a => ToDerivClauses (Maybe a) Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toDerivClauses :: Maybe a -> [DerivClause] Source #
ToDerivClauses a => ToDerivClauses [a] Source # |
Instance details Defined in Language.Haskell.Meta.Syntax.Translate Methods toDerivClauses :: [a] -> [DerivClause] Source #

noTH :: (Functor f, Show (f ())) => String -> f e -> a Source #

noTHyet :: (Functor f, Show (f ())) => String -> String -> f e -> a Source #

todo :: (Functor f, Show (f ())) => String -> f e -> a Source #

nonsense :: (Functor f, Show (f ())) => String -> String -> f e -> a Source #

toTupEl :: ToExp a => a -> Maybe Exp Source #

toFieldExp :: FieldUpdate l -> FieldExp Source #

toGuard :: GuardedRhs l -> (Guard, Exp) Source #

toMatch :: Alt l -> Match Source #

toBody :: Rhs l -> Body Source #

toKind :: Kind l -> Kind Source #

toTyVar :: TyVarBind l -> TyVarBndr_ () Source #

toTyVarSpec :: TyVarBndr_ () -> TyVarBndrSpec Source #

toTyVarsVis :: ToTyVars a => a -> [TyVarBndrVis] Source #

(.->.) :: Type -> Type -> Type Source #

foldAppT :: Type -> [Type] -> Type Source #

toStrictType :: Type l -> StrictType Source #

toDerivStrategy :: DerivStrategy l -> DerivStrategy Source #

qualConDeclToCon :: QualConDecl l -> Con Source #

transAct :: Maybe (Activation l) -> Phases Source #

hsMatchesToFunD :: [Match l] -> Dec Source #

hsRhsToBody :: Rhs l -> Body Source #

conDeclToCon :: ConDecl l -> Con Source #

hsMatchToClause :: Match l -> Clause Source #

hsGuardedRhsToBody :: GuardedRhs l -> Body Source #

hsStmtToGuard :: Stmt l -> Guard Source #

type TyVarBndr_ flag = TyVarBndr flag Source #