Language.Haskell.Meta.Syntax.Translate

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 #

type DerivClause = DerivClause #

class ToName a where #

Methods

toName :: a -> Name #

#### Instances

Instances details

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

class ToNames a where #

Methods

toNames :: a -> [Name] #

#### Instances

Instances details

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

class ToLit a where #

Methods

toLit :: a -> Lit #

#### Instances

Instances details

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

class ToType a where #

Methods

toType :: a -> Type #

#### Instances

Instances details

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

class ToPat a where #

Methods

toPat :: a -> Pat #

#### Instances

Instances details

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

class ToExp a where #

Methods

toExp :: a -> Exp #

#### Instances

Instances details

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

class ToDecs a where #

Methods

toDecs :: a -> [Dec] #

#### Instances

Instances details

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

class ToDec a where #

Methods

toDec :: a -> Dec #

#### Instances

Instances details

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

class ToStmt a where #

Methods

toStmt :: a -> Stmt #

#### Instances

Instances details

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

class ToLoc a where #

Methods

toLoc :: a -> Loc #

#### Instances

Instances details

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

class ToCxt a where #

Methods

toCxt :: a -> Cxt #

#### Instances

Instances details

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

class ToPred a where #

Methods

toPred :: a -> Pred #

#### Instances

Instances details

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

class ToTyVars a where #

Methods

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

#### Instances

Instances details

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

class ToMaybeKind a where #

Methods

toMaybeKind :: a -> Maybe Kind #

#### Instances

Instances details

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

class ToInjectivityAnn a where #

Methods

toInjectivityAnn :: a -> InjectivityAnn #

#### Instances

Instances details

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

class ToDerivClauses a where #

Methods

toDerivClauses :: a -> [DerivClause] #

#### Instances

Instances details

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

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

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

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

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

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

toFieldExp :: FieldUpdate l -> FieldExp #

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

toMatch :: Alt l -> Match #

toBody :: Rhs l -> Body #

toKind :: Kind l -> Kind #

toTyVar :: TyVarBind l -> TyVarBndr_ () #

toTyVarSpec :: TyVarBndr_ () -> TyVarBndrSpec #

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

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

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

toStrictType :: Type l -> StrictType #

toDerivStrategy :: DerivStrategy l -> DerivStrategy #

qualConDeclToCon :: QualConDecl l -> Con #

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

hsMatchesToFunD :: [Match l] -> Dec #

hsRhsToBody :: Rhs l -> Body #

conDeclToCon :: ConDecl l -> Con #

hsMatchToClause :: Match l -> Clause #

hsGuardedRhsToBody :: GuardedRhs l -> Body #

hsStmtToGuard :: Stmt l -> Guard #

type TyVarBndr_ flag = TyVarBndr flag #