ghc-internal-9.1300.0: Basic libraries
Safe HaskellTrustworthy
LanguageHaskell2010

GHC.Internal.TH.Lift

Description

This module gives the definition of the Lift class.

This is an internal module. Please import Language.Haskell.TH or Language.Haskell.TH.Syntax instead!

Synopsis

Documentation

class Lift (t :: TYPE r) where Source #

A Lift instance can have any of its values turned into a Template Haskell expression. This is needed when a value used within a Template Haskell quotation is bound outside the Oxford brackets ([| ... |] or [|| ... ||]) but not at the top level. As an example:

add1 :: Int -> Code Q Int
add1 x = [|| x + 1 ||]

Template Haskell has no way of knowing what value x will take on at splice-time, so it requires the type of x to be an instance of Lift.

A Lift instance must satisfy $(lift x) ≡ x and $$(liftTyped x) ≡ x for all x, where $(...) and $$(...) are Template Haskell splices. It is additionally expected that lift x ≡ unTypeCode (liftTyped x).

Lift instances can be derived automatically by use of the -XDeriveLift GHC language extension:

{-# LANGUAGE DeriveLift #-}
module Foo where

import Language.Haskell.TH.Syntax

data Bar a = Bar1 a (Bar a) | Bar2 String
  deriving Lift

Representation-polymorphic since template-haskell-2.16.0.0.

Minimal complete definition

liftTyped

Methods

lift :: Quote m => t -> m Exp Source #

Turn a value into a Template Haskell expression, suitable for use in a splice.

default lift :: forall m. (r ~ LiftedRep, Quote m) => t -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => t -> Code m t Source #

Turn a value into a Template Haskell typed expression, suitable for use in a typed splice.

Since: template-haskell-2.16.0.0

Instances

Instances details
Lift Addr# Source #

Produces an Addr# literal from the NUL-terminated C-string starting at the given memory address.

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Addr# -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Addr# -> Code m Addr# Source #

Lift Double# Source #

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Double# -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Double# -> Code m Double# Source #

Lift Float# Source #

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Float# -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Float# -> Code m Float# Source #

Lift Int# Source #

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Int# -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Int# -> Code m Int# Source #

Lift Void Source #

Since: template-haskell-2.15.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Void -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Void -> Code m Void Source #

Lift ForeignSrcLang Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => ForeignSrcLang -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => ForeignSrcLang -> Code m ForeignSrcLang Source #

Lift Int16 Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Int16 -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Int16 -> Code m Int16 Source #

Lift Int32 Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Int32 -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Int32 -> Code m Int32 Source #

Lift Int64 Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Int64 -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Int64 -> Code m Int64 Source #

Lift Int8 Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Int8 -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Int8 -> Code m Int8 Source #

Lift Extension Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Extension -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Extension -> Code m Extension Source #

Lift AnnLookup Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => AnnLookup -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => AnnLookup -> Code m AnnLookup Source #

Lift AnnTarget Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => AnnTarget -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => AnnTarget -> Code m AnnTarget Source #

Lift Bang Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Bang -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Bang -> Code m Bang Source #

Lift BndrVis Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => BndrVis -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => BndrVis -> Code m BndrVis Source #

Lift Body Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Body -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Body -> Code m Body Source #

Lift Bytes Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Bytes -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Bytes -> Code m Bytes Source #

Lift Callconv Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Callconv -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Callconv -> Code m Callconv Source #

Lift Clause Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Clause -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Clause -> Code m Clause Source #

Lift Con Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Con -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Con -> Code m Con Source #

Lift Dec Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Dec -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Dec -> Code m Dec Source #

Lift DecidedStrictness Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Lift DerivClause Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => DerivClause -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => DerivClause -> Code m DerivClause Source #

Lift DerivStrategy Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => DerivStrategy -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => DerivStrategy -> Code m DerivStrategy Source #

Lift DocLoc Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => DocLoc -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => DocLoc -> Code m DocLoc Source #

Lift Exp Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Exp -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Exp -> Code m Exp Source #

Lift FamilyResultSig Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Lift Fixity Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Fixity -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Fixity -> Code m Fixity Source #

Lift FixityDirection Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Lift Foreign Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Foreign -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Foreign -> Code m Foreign Source #

Lift FunDep Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => FunDep -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => FunDep -> Code m FunDep Source #

Lift Guard Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Guard -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Guard -> Code m Guard Source #

Lift Info Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Info -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Info -> Code m Info Source #

Lift InjectivityAnn Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => InjectivityAnn -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => InjectivityAnn -> Code m InjectivityAnn Source #

Lift Inline Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Inline -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Inline -> Code m Inline Source #

Lift Lit Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Lit -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Lit -> Code m Lit Source #

Lift Loc Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Loc -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Loc -> Code m Loc Source #

Lift Match Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Match -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Match -> Code m Match Source #

Lift ModName Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => ModName -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => ModName -> Code m ModName Source #

Lift Module Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Module -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Module -> Code m Module Source #

Lift Name Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Name -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Name -> Code m Name Source #

Lift NameFlavour Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => NameFlavour -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => NameFlavour -> Code m NameFlavour Source #

Lift NameIs Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => NameIs -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => NameIs -> Code m NameIs Source #

Lift NameSpace Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => NameSpace -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => NameSpace -> Code m NameSpace Source #

Lift NamespaceSpecifier Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Lift OccName Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => OccName -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => OccName -> Code m OccName Source #

Lift Overlap Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Overlap -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Overlap -> Code m Overlap Source #

Lift Pat Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Pat -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Pat -> Code m Pat Source #

Lift PatSynArgs Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => PatSynArgs -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => PatSynArgs -> Code m PatSynArgs Source #

Lift PatSynDir Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => PatSynDir -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => PatSynDir -> Code m PatSynDir Source #

Lift Phases Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Phases -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Phases -> Code m Phases Source #

Lift PkgName Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => PkgName -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => PkgName -> Code m PkgName Source #

Lift Pragma Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Pragma -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Pragma -> Code m Pragma Source #

Lift Range Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Range -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Range -> Code m Range Source #

Lift Role Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Role -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Role -> Code m Role Source #

Lift RuleBndr Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => RuleBndr -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => RuleBndr -> Code m RuleBndr Source #

Lift RuleMatch Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => RuleMatch -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => RuleMatch -> Code m RuleMatch Source #

Lift Safety Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Safety -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Safety -> Code m Safety Source #

Lift SourceStrictness Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Lift SourceUnpackedness Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Lift Specificity Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Specificity -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Specificity -> Code m Specificity Source #

Lift Stmt Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Stmt -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Stmt -> Code m Stmt Source #

Lift TyLit Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => TyLit -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => TyLit -> Code m TyLit Source #

Lift TySynEqn Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => TySynEqn -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => TySynEqn -> Code m TySynEqn Source #

Lift Type Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Type -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Type -> Code m Type Source #

Lift TypeFamilyHead Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => TypeFamilyHead -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => TypeFamilyHead -> Code m TypeFamilyHead Source #

Lift Word16 Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Word16 -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Word16 -> Code m Word16 Source #

Lift Word32 Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Word32 -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Word32 -> Code m Word32 Source #

Lift Word64 Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Word64 -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Word64 -> Code m Word64 Source #

Lift Word8 Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Word8 -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Word8 -> Code m Word8 Source #

Lift Integer Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Integer -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Integer -> Code m Integer Source #

Lift Natural Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Natural -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Natural -> Code m Natural Source #

Lift () Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => () -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => () -> Code m () Source #

Lift Bool Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Bool -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Bool -> Code m Bool Source #

Lift Char Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Char -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Char -> Code m Char Source #

Lift Double Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Double -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Double -> Code m Double Source #

Lift Float Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Float -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Float -> Code m Float Source #

Lift Int Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Int -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Int -> Code m Int Source #

Lift Word Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Word -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Word -> Code m Word Source #

Lift Char# Source #

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Char# -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Char# -> Code m Char# Source #

Lift Word# Source #

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Word# -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Word# -> Code m Word# Source #

Lift (# #) Source #

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (# #) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (# #) -> Code m (# #) Source #

Lift a => Lift (NonEmpty a :: Type) Source #

Since: template-haskell-2.15.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => NonEmpty a -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => NonEmpty a -> Code m (NonEmpty a) Source #

Integral a => Lift (Ratio a :: Type) Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Ratio a -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Ratio a -> Code m (Ratio a) Source #

Lift a => Lift (TyVarBndr a :: Type) Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => TyVarBndr a -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => TyVarBndr a -> Code m (TyVarBndr a) Source #

Lift a => Lift (Maybe a :: Type) Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Maybe a -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Maybe a -> Code m (Maybe a) Source #

Lift a => Lift ([a] :: Type) Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => [a] -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => [a] -> Code m [a] Source #

(Lift a, Lift b) => Lift (Either a b :: Type) Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Either a b -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Either a b -> Code m (Either a b) Source #

Lift (TExp a :: Type) Source #

Since: template-haskell-2.22.1.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => TExp a -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => TExp a -> Code m (TExp a) Source #

(Lift a, Lift b) => Lift ((a, b) :: Type) Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (a, b) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (a, b) -> Code m (a, b) Source #

(Lift a, Lift b, Lift c) => Lift ((a, b, c) :: Type) Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (a, b, c) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (a, b, c) -> Code m (a, b, c) Source #

(Lift a, Lift b, Lift c, Lift d) => Lift ((a, b, c, d) :: Type) Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (a, b, c, d) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (a, b, c, d) -> Code m (a, b, c, d) Source #

(Lift a, Lift b, Lift c, Lift d, Lift e) => Lift ((a, b, c, d, e) :: Type) Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (a, b, c, d, e) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (a, b, c, d, e) -> Code m (a, b, c, d, e) Source #

(Lift a, Lift b, Lift c, Lift d, Lift e, Lift f) => Lift ((a, b, c, d, e, f) :: Type) Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (a, b, c, d, e, f) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (a, b, c, d, e, f) -> Code m (a, b, c, d, e, f) Source #

(Lift a, Lift b, Lift c, Lift d, Lift e, Lift f, Lift g) => Lift ((a, b, c, d, e, f, g) :: Type) Source # 
Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (a, b, c, d, e, f, g) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (a, b, c, d, e, f, g) -> Code m (a, b, c, d, e, f, g) Source #

Lift a => Lift ((# a #) :: TYPE ('TupleRep '[LiftedRep])) Source #

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (# a #) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (# a #) -> Code m (# a #) Source #

(Lift a, Lift b) => Lift ((# a | b #) :: TYPE ('SumRep '[LiftedRep, LiftedRep])) Source #

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (# a | b #) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (# a | b #) -> Code m (# a | b #) Source #

(Lift a, Lift b) => Lift ((# a, b #) :: TYPE ('TupleRep '[LiftedRep, LiftedRep])) Source #

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (# a, b #) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (# a, b #) -> Code m (# a, b #) Source #

(Lift a, Lift b, Lift c) => Lift ((# a | b | c #) :: TYPE ('SumRep '[LiftedRep, LiftedRep, LiftedRep])) Source #

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (# a | b | c #) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (# a | b | c #) -> Code m (# a | b | c #) Source #

(Lift a, Lift b, Lift c) => Lift ((# a, b, c #) :: TYPE ('TupleRep '[LiftedRep, LiftedRep, LiftedRep])) Source #

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (# a, b, c #) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (# a, b, c #) -> Code m (# a, b, c #) Source #

(Lift a, Lift b, Lift c, Lift d) => Lift ((# a | b | c | d #) :: TYPE ('SumRep '[LiftedRep, LiftedRep, LiftedRep, LiftedRep])) Source #

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (# a | b | c | d #) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (# a | b | c | d #) -> Code m (# a | b | c | d #) Source #

(Lift a, Lift b, Lift c, Lift d) => Lift ((# a, b, c, d #) :: TYPE ('TupleRep '[LiftedRep, LiftedRep, LiftedRep, LiftedRep])) Source #

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (# a, b, c, d #) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (# a, b, c, d #) -> Code m (# a, b, c, d #) Source #

(Lift a, Lift b, Lift c, Lift d, Lift e) => Lift ((# a | b | c | d | e #) :: TYPE ('SumRep '[LiftedRep, LiftedRep, LiftedRep, LiftedRep, LiftedRep])) Source #

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (# a | b | c | d | e #) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (# a | b | c | d | e #) -> Code m (# a | b | c | d | e #) Source #

(Lift a, Lift b, Lift c, Lift d, Lift e) => Lift ((# a, b, c, d, e #) :: TYPE ('TupleRep '[LiftedRep, LiftedRep, LiftedRep, LiftedRep, LiftedRep])) Source #

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (# a, b, c, d, e #) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (# a, b, c, d, e #) -> Code m (# a, b, c, d, e #) Source #

(Lift a, Lift b, Lift c, Lift d, Lift e, Lift f) => Lift ((# a | b | c | d | e | f #) :: TYPE ('SumRep '[LiftedRep, LiftedRep, LiftedRep, LiftedRep, LiftedRep, LiftedRep])) Source #

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (# a | b | c | d | e | f #) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (# a | b | c | d | e | f #) -> Code m (# a | b | c | d | e | f #) Source #

(Lift a, Lift b, Lift c, Lift d, Lift e, Lift f) => Lift ((# a, b, c, d, e, f #) :: TYPE ('TupleRep '[LiftedRep, LiftedRep, LiftedRep, LiftedRep, LiftedRep, LiftedRep])) Source #

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (# a, b, c, d, e, f #) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (# a, b, c, d, e, f #) -> Code m (# a, b, c, d, e, f #) Source #

(Lift a, Lift b, Lift c, Lift d, Lift e, Lift f, Lift g) => Lift ((# a | b | c | d | e | f | g #) :: TYPE ('SumRep '[LiftedRep, LiftedRep, LiftedRep, LiftedRep, LiftedRep, LiftedRep, LiftedRep])) Source #

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (# a | b | c | d | e | f | g #) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (# a | b | c | d | e | f | g #) -> Code m (# a | b | c | d | e | f | g #) Source #

(Lift a, Lift b, Lift c, Lift d, Lift e, Lift f, Lift g) => Lift ((# a, b, c, d, e, f, g #) :: TYPE ('TupleRep '[LiftedRep, LiftedRep, LiftedRep, LiftedRep, LiftedRep, LiftedRep, LiftedRep])) Source #

Since: template-haskell-2.16.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => (# a, b, c, d, e, f, g #) -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => (# a, b, c, d, e, f, g #) -> Code m (# a, b, c, d, e, f, g #) Source #

Generic Lift implementations

dataToQa :: (Quote m, Data a) => (Name -> k) -> (Lit -> m q) -> (k -> [m q] -> m q) -> (forall b. Data b => b -> Maybe (m q)) -> a -> m q Source #

dataToQa is an internal utility function for constructing generic conversion functions from types with Data instances to various quasi-quoting representations. See the source of dataToExpQ and dataToPatQ for two example usages: mkCon, mkLit and appQ are overloadable to account for different syntax for expressions and patterns; antiQ allows you to override type-specific cases, a common usage is just const Nothing, which results in no overloading.

dataToExpQ :: (Quote m, Data a) => (forall b. Data b => b -> Maybe (m Exp)) -> a -> m Exp Source #

dataToExpQ converts a value to a Exp representation of the same value, in the SYB style. It is generalized to take a function override type-specific cases; see liftData for a more commonly used variant.

liftData :: (Quote m, Data a) => a -> m Exp Source #

liftData is a variant of lift in the Lift type class which works for any type with a Data instance.

dataToPatQ :: (Quote m, Data a) => (forall b. Data b => b -> Maybe (m Pat)) -> a -> m Pat Source #

dataToPatQ converts a value to a Pat representation of the same value, in the SYB style. It takes a function to handle type-specific cases, alternatively, pass const Nothing to get default behavior.

Wired-in names