Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data V2 (q :: Type -> Type) (p :: k)
- data U2 (q :: Type -> Type) (p :: k) = U2
- newtype M2 (i :: Type) (c :: Meta) (f :: (Type -> Type) -> k -> Type) (q :: Type -> Type) (p :: k) = M2 {
- unM2 :: f q p
- newtype K2 c (q :: Type -> Type) (p :: k) = K2 {
- unK2 :: q c
- newtype Par2 (q :: Type -> Type) (p :: Type) = Par2 {
- unPar2 :: q p
- data ((f :: (Type -> Type) -> k -> Type) :++: (g :: (Type -> Type) -> k -> Type)) (q :: Type -> Type) (p :: k)
- data ((f :: (Type -> Type) -> k -> Type) :**: (g :: (Type -> Type) -> k -> Type)) (q :: Type -> Type) (p :: k) = (f q p) :**: (g q p)
- newtype ((f :: (Type -> Type) -> k2 -> Type) :@@: (g :: k1 -> k2)) (q :: Type -> Type) (p :: k1) = App2 {
- unApp2 :: f q (g p)
- type D2 = M2 D
- type C2 = M2 C
- type S2 = M2 S
- data D
- data C
- data S
- class Datatype (d :: k) where
- datatypeName :: forall k1 t (f :: k1 -> Type) (a :: k1). t d f a -> [Char]
- moduleName :: forall k1 t (f :: k1 -> Type) (a :: k1). t d f a -> [Char]
- packageName :: forall k1 t (f :: k1 -> Type) (a :: k1). t d f a -> [Char]
- isNewtype :: forall k1 t (f :: k1 -> Type) (a :: k1). t d f a -> Bool
- class Constructor (c :: k) where
- class Selector (s :: k) where
- selName :: forall k1 t (f :: k1 -> Type) (a :: k1). t s f a -> [Char]
- selSourceUnpackedness :: forall k1 t (f :: k1 -> Type) (a :: k1). t s f a -> SourceUnpackedness
- selSourceStrictness :: forall k1 t (f :: k1 -> Type) (a :: k1). t s f a -> SourceStrictness
- selDecidedStrictness :: forall k1 t (f :: k1 -> Type) (a :: k1). t s f a -> DecidedStrictness
- data Fixity
- data FixityI
- data Associativity
- data SourceUnpackedness
- data SourceStrictness
- data DecidedStrictness
- data Meta
- class Generic (a :: Type) where
- class Generic1 (f :: k -> Type) where
- data Code (m :: Type -> Type) (a :: TYPE r)
- class Monad m => Quote (m :: Type -> Type)
- type family Translate (f :: k -> Type) :: (Type -> Type) -> k -> Type where ...
Generic representation types
newtype M2 (i :: Type) (c :: Meta) (f :: (Type -> Type) -> k -> Type) (q :: Type -> Type) (p :: k) Source #
Instances
Eq (f q p) => Eq (M2 i c f q p) Source # | |
Ord (f q p) => Ord (M2 i c f q p) Source # | |
Defined in Staged.GHC.Generics.Types | |
Read (f q p) => Read (M2 i c f q p) Source # | |
Show (f q p) => Show (M2 i c f q p) Source # | |
data ((f :: (Type -> Type) -> k -> Type) :++: (g :: (Type -> Type) -> k -> Type)) (q :: Type -> Type) (p :: k) infixr 5 Source #
Instances
(Eq (f q p), Eq (g q p)) => Eq ((f :++: g) q p) Source # | |
(Ord (f q p), Ord (g q p)) => Ord ((f :++: g) q p) Source # | |
Defined in Staged.GHC.Generics.Types compare :: (f :++: g) q p -> (f :++: g) q p -> Ordering # (<) :: (f :++: g) q p -> (f :++: g) q p -> Bool # (<=) :: (f :++: g) q p -> (f :++: g) q p -> Bool # (>) :: (f :++: g) q p -> (f :++: g) q p -> Bool # (>=) :: (f :++: g) q p -> (f :++: g) q p -> Bool # | |
(Read (f q p), Read (g q p)) => Read ((f :++: g) q p) Source # | |
(Show (f q p), Show (g q p)) => Show ((f :++: g) q p) Source # | |
data ((f :: (Type -> Type) -> k -> Type) :**: (g :: (Type -> Type) -> k -> Type)) (q :: Type -> Type) (p :: k) infixr 6 Source #
(f q p) :**: (g q p) infixr 6 |
Instances
(Eq (f q p), Eq (g q p)) => Eq ((f :**: g) q p) Source # | |
(Ord (f q p), Ord (g q p)) => Ord ((f :**: g) q p) Source # | |
Defined in Staged.GHC.Generics.Types compare :: (f :**: g) q p -> (f :**: g) q p -> Ordering # (<) :: (f :**: g) q p -> (f :**: g) q p -> Bool # (<=) :: (f :**: g) q p -> (f :**: g) q p -> Bool # (>) :: (f :**: g) q p -> (f :**: g) q p -> Bool # (>=) :: (f :**: g) q p -> (f :**: g) q p -> Bool # | |
(Read (f q p), Read (g q p)) => Read ((f :**: g) q p) Source # | |
(Show (f q p), Show (g q p)) => Show ((f :**: g) q p) Source # | |
newtype ((f :: (Type -> Type) -> k2 -> Type) :@@: (g :: k1 -> k2)) (q :: Type -> Type) (p :: k1) infixl 7 Source #
Instances
Eq (f q (g p)) => Eq ((f :@@: g) q p) Source # | |
Ord (f q (g p)) => Ord ((f :@@: g) q p) Source # | |
Defined in Staged.GHC.Generics.Types compare :: (f :@@: g) q p -> (f :@@: g) q p -> Ordering # (<) :: (f :@@: g) q p -> (f :@@: g) q p -> Bool # (<=) :: (f :@@: g) q p -> (f :@@: g) q p -> Bool # (>) :: (f :@@: g) q p -> (f :@@: g) q p -> Bool # (>=) :: (f :@@: g) q p -> (f :@@: g) q p -> Bool # | |
Read (f q (g p)) => Read ((f :@@: g) q p) Source # | |
Show (f q (g p)) => Show ((f :@@: g) q p) Source # | |
Synonyms for convenience
Meta-information
class Datatype (d :: k) where #
Class for datatypes that represent datatypes
datatypeName :: forall k1 t (f :: k1 -> Type) (a :: k1). t d f a -> [Char] #
The name of the datatype (unqualified)
moduleName :: forall k1 t (f :: k1 -> Type) (a :: k1). t d f a -> [Char] #
The fully-qualified name of the module where the type is declared
packageName :: forall k1 t (f :: k1 -> Type) (a :: k1). t d f a -> [Char] #
The package name of the module where the type is declared
Since: base-4.9.0.0
isNewtype :: forall k1 t (f :: k1 -> Type) (a :: k1). t d f a -> Bool #
Marks if the datatype is actually a newtype
Since: base-4.7.0.0
Instances
(KnownSymbol n, KnownSymbol m, KnownSymbol p, SingI nt) => Datatype ('MetaData n m p nt :: Meta) | Since: base-4.9.0.0 |
Defined in GHC.Generics datatypeName :: forall k1 t (f :: k1 -> Type) (a :: k1). t ('MetaData n m p nt) f a -> [Char] # moduleName :: forall k1 t (f :: k1 -> Type) (a :: k1). t ('MetaData n m p nt) f a -> [Char] # packageName :: forall k1 t (f :: k1 -> Type) (a :: k1). t ('MetaData n m p nt) f a -> [Char] # isNewtype :: forall k1 t (f :: k1 -> Type) (a :: k1). t ('MetaData n m p nt) f a -> Bool # |
class Constructor (c :: k) where #
Class for datatypes that represent data constructors
conName :: forall k1 t (f :: k1 -> Type) (a :: k1). t c f a -> [Char] #
The name of the constructor
conFixity :: forall k1 t (f :: k1 -> Type) (a :: k1). t c f a -> Fixity #
The fixity of the constructor
conIsRecord :: forall k1 t (f :: k1 -> Type) (a :: k1). t c f a -> Bool #
Marks if this constructor is a record
Instances
(KnownSymbol n, SingI f, SingI r) => Constructor ('MetaCons n f r :: Meta) | Since: base-4.9.0.0 |
class Selector (s :: k) where #
Class for datatypes that represent records
selName :: forall k1 t (f :: k1 -> Type) (a :: k1). t s f a -> [Char] #
The name of the selector
selSourceUnpackedness :: forall k1 t (f :: k1 -> Type) (a :: k1). t s f a -> SourceUnpackedness #
The selector's unpackedness annotation (if any)
Since: base-4.9.0.0
selSourceStrictness :: forall k1 t (f :: k1 -> Type) (a :: k1). t s f a -> SourceStrictness #
The selector's strictness annotation (if any)
Since: base-4.9.0.0
selDecidedStrictness :: forall k1 t (f :: k1 -> Type) (a :: k1). t s f a -> DecidedStrictness #
The strictness that the compiler inferred for the selector
Since: base-4.9.0.0
Instances
(SingI mn, SingI su, SingI ss, SingI ds) => Selector ('MetaSel mn su ss ds :: Meta) | Since: base-4.9.0.0 |
Defined in GHC.Generics selName :: forall k1 t (f :: k1 -> Type) (a :: k1). t ('MetaSel mn su ss ds) f a -> [Char] # selSourceUnpackedness :: forall k1 t (f :: k1 -> Type) (a :: k1). t ('MetaSel mn su ss ds) f a -> SourceUnpackedness # selSourceStrictness :: forall k1 t (f :: k1 -> Type) (a :: k1). t ('MetaSel mn su ss ds) f a -> SourceStrictness # selDecidedStrictness :: forall k1 t (f :: k1 -> Type) (a :: k1). t ('MetaSel mn su ss ds) f a -> DecidedStrictness # |
Datatype to represent the fixity of a constructor. An infix
| declaration directly corresponds to an application of Infix
.
Instances
Eq Fixity | Since: base-4.6.0.0 |
Data Fixity | Since: base-4.9.0.0 |
Defined in Data.Data gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Fixity -> c Fixity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Fixity # toConstr :: Fixity -> Constr # dataTypeOf :: Fixity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Fixity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Fixity) # gmapT :: (forall b. Data b => b -> b) -> Fixity -> Fixity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQ :: (forall d. Data d => d -> u) -> Fixity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Fixity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # | |
Ord Fixity | Since: base-4.6.0.0 |
Read Fixity | Since: base-4.6.0.0 |
Show Fixity | Since: base-4.6.0.0 |
Generic Fixity | Since: base-4.7.0.0 |
Generic Fixity Source # | |
Defined in Staged.GHC.Generics.Instances | |
type Rep Fixity | |
Defined in GHC.Generics type Rep Fixity = D1 ('MetaData "Fixity" "GHC.Generics" "base" 'False) (C1 ('MetaCons "Prefix" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Infix" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Associativity) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) | |
type Rep Fixity Source # | |
Defined in Staged.GHC.Generics.Instances type Rep Fixity = D2 ('MetaData "Fixity" "GHC.Generics" "base" 'False) (C2 ('MetaCons "Prefix" 'PrefixI 'False) (U2 :: (Type -> Type) -> Type -> Type) :++: C2 ('MetaCons "Infix" 'PrefixI 'False) (S2 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (K2 Associativity :: (Type -> Type) -> Type -> Type) :**: S2 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (K2 Int :: (Type -> Type) -> Type -> Type))) |
This variant of Fixity
appears at the type level.
Since: base-4.9.0.0
Instances
SingKind FixityI | Since: base-4.9.0.0 |
Defined in GHC.Generics type DemoteRep FixityI | |
SingI 'PrefixI | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
(SingI a, KnownNat n) => SingI ('InfixI a n :: FixityI) | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
type DemoteRep FixityI | |
Defined in GHC.Generics | |
data Sing (a :: FixityI) | |
Defined in GHC.Generics |
data Associativity #
Datatype to represent the associativity of a constructor
Instances
data SourceUnpackedness #
The unpackedness of a field as the user wrote it in the source code. For example, in the following data type:
data E = ExampleConstructor Int {-# NOUNPACK #-} Int {-# UNPACK #-} Int
The fields of ExampleConstructor
have NoSourceUnpackedness
,
SourceNoUnpack
, and SourceUnpack
, respectively.
Since: base-4.9.0.0
Instances
data SourceStrictness #
The strictness of a field as the user wrote it in the source code. For example, in the following data type:
data E = ExampleConstructor Int ~Int !Int
The fields of ExampleConstructor
have NoSourceStrictness
,
SourceLazy
, and SourceStrict
, respectively.
Since: base-4.9.0.0
Instances
data DecidedStrictness #
The strictness that GHC infers for a field during compilation. Whereas
there are nine different combinations of SourceUnpackedness
and
SourceStrictness
, the strictness that GHC decides will ultimately be one
of lazy, strict, or unpacked. What GHC decides is affected both by what the
user writes in the source code and by GHC flags. As an example, consider
this data type:
data E = ExampleConstructor {-# UNPACK #-} !Int !Int Int
- If compiled without optimization or other language extensions, then the
fields of
ExampleConstructor
will haveDecidedStrict
,DecidedStrict
, andDecidedLazy
, respectively. - If compiled with
-XStrictData
enabled, then the fields will haveDecidedStrict
,DecidedStrict
, andDecidedStrict
, respectively. - If compiled with
-O2
enabled, then the fields will haveDecidedUnpack
,DecidedStrict
, andDecidedLazy
, respectively.
Since: base-4.9.0.0
Instances
Datatype to represent metadata associated with a datatype (MetaData
),
constructor (MetaCons
), or field selector (MetaSel
).
- In
MetaData n m p nt
,n
is the datatype's name,m
is the module in which the datatype is defined,p
is the package in which the datatype is defined, andnt
is'True
if the datatype is anewtype
. - In
MetaCons n f s
,n
is the constructor's name,f
is its fixity, ands
is'True
if the constructor contains record selectors. - In
MetaSel mn su ss ds
, if the field uses record syntax, thenmn
isJust
the record name. Otherwise,mn
isNothing
.su
andss
are the field's unpackedness and strictness annotations, andds
is the strictness that GHC infers for the field.
Since: base-4.9.0.0
MetaData Symbol Symbol Symbol Bool | |
MetaCons Symbol FixityI Bool | |
MetaSel (Maybe Symbol) SourceUnpackedness SourceStrictness DecidedStrictness |
Instances
(KnownSymbol n, SingI f, SingI r) => Constructor ('MetaCons n f r :: Meta) | Since: base-4.9.0.0 |
(KnownSymbol n, KnownSymbol m, KnownSymbol p, SingI nt) => Datatype ('MetaData n m p nt :: Meta) | Since: base-4.9.0.0 |
Defined in GHC.Generics datatypeName :: forall k1 t (f :: k1 -> Type) (a :: k1). t ('MetaData n m p nt) f a -> [Char] # moduleName :: forall k1 t (f :: k1 -> Type) (a :: k1). t ('MetaData n m p nt) f a -> [Char] # packageName :: forall k1 t (f :: k1 -> Type) (a :: k1). t ('MetaData n m p nt) f a -> [Char] # isNewtype :: forall k1 t (f :: k1 -> Type) (a :: k1). t ('MetaData n m p nt) f a -> Bool # | |
(SingI mn, SingI su, SingI ss, SingI ds) => Selector ('MetaSel mn su ss ds :: Meta) | Since: base-4.9.0.0 |
Defined in GHC.Generics selName :: forall k1 t (f :: k1 -> Type) (a :: k1). t ('MetaSel mn su ss ds) f a -> [Char] # selSourceUnpackedness :: forall k1 t (f :: k1 -> Type) (a :: k1). t ('MetaSel mn su ss ds) f a -> SourceUnpackedness # selSourceStrictness :: forall k1 t (f :: k1 -> Type) (a :: k1). t ('MetaSel mn su ss ds) f a -> SourceStrictness # selDecidedStrictness :: forall k1 t (f :: k1 -> Type) (a :: k1). t ('MetaSel mn su ss ds) f a -> DecidedStrictness # |
Generic type classes
class Generic (a :: Type) where Source #
to :: Quote q => Rep a (Code q) x -> Code q a Source #
from :: Quote q => Code q a -> (Rep a (Code q) x -> Code q r) -> Code q r Source #
Instances
class Generic1 (f :: k -> Type) where Source #
to1 :: Quote q => Rep1 f (Code q) x -> Code q (f x) Source #
from1 :: Quote q => Code q (f x) -> (Rep1 f (Code q) x -> Code q r) -> Code q r Source #
Instances
Generic1 [] Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 Maybe Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 Min Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 Max Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 First Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 Last Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 WrappedMonoid Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 Option Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 Identity Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 First Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 Last Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 Dual Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 Sum Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 Product Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 Down Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 NonEmpty Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 (Either a :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 ((,) a :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 (Arg a :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 (Proxy :: k -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 ((,,) a b :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 (Const a :: k -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 (Alt f :: k -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 ((,,,) a b c :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 (Product f g :: k -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 (Sum f g :: k -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 ((,,,,) a b c d :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 (Compose f g :: k1 -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 ((,,,,,) a b c d e :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 ((,,,,,,) a b c d e f :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances | |
Generic1 ((,,,,,,,) a b c d e f g :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances to1 :: forall (q :: Type -> Type) (x :: k). Quote q => Rep1 ((,,,,,,,) a b c d e f g) (Code q) x -> Code q (a, b, c, d, e, f, g, x) Source # from1 :: forall (q :: Type -> Type) (x :: k) r. Quote q => Code q (a, b, c, d, e, f, g, x) -> (Rep1 ((,,,,,,,) a b c d e f g) (Code q) x -> Code q r) -> Code q r Source # | |
Generic1 ((,,,,,,,,) a b c d e f g h :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances to1 :: forall (q :: Type -> Type) (x :: k). Quote q => Rep1 ((,,,,,,,,) a b c d e f g h) (Code q) x -> Code q (a, b, c, d, e, f, g, h, x) Source # from1 :: forall (q :: Type -> Type) (x :: k) r. Quote q => Code q (a, b, c, d, e, f, g, h, x) -> (Rep1 ((,,,,,,,,) a b c d e f g h) (Code q) x -> Code q r) -> Code q r Source # | |
Generic1 ((,,,,,,,,,) a b c d e f g h i :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances to1 :: forall (q :: Type -> Type) (x :: k). Quote q => Rep1 ((,,,,,,,,,) a b c d e f g h i) (Code q) x -> Code q (a, b, c, d, e, f, g, h, i, x) Source # from1 :: forall (q :: Type -> Type) (x :: k) r. Quote q => Code q (a, b, c, d, e, f, g, h, i, x) -> (Rep1 ((,,,,,,,,,) a b c d e f g h i) (Code q) x -> Code q r) -> Code q r Source # | |
Generic1 ((,,,,,,,,,,) a b c d e f g h i j :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances to1 :: forall (q :: Type -> Type) (x :: k). Quote q => Rep1 ((,,,,,,,,,,) a b c d e f g h i j) (Code q) x -> Code q (a, b, c, d, e, f, g, h, i, j, x) Source # from1 :: forall (q :: Type -> Type) (x :: k) r. Quote q => Code q (a, b, c, d, e, f, g, h, i, j, x) -> (Rep1 ((,,,,,,,,,,) a b c d e f g h i j) (Code q) x -> Code q r) -> Code q r Source # | |
Generic1 ((,,,,,,,,,,,) a b c d e f g h i j k :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances to1 :: forall (q :: Type -> Type) (x :: k0). Quote q => Rep1 ((,,,,,,,,,,,) a b c d e f g h i j k) (Code q) x -> Code q (a, b, c, d, e, f, g, h, i, j, k, x) Source # from1 :: forall (q :: Type -> Type) (x :: k0) r. Quote q => Code q (a, b, c, d, e, f, g, h, i, j, k, x) -> (Rep1 ((,,,,,,,,,,,) a b c d e f g h i j k) (Code q) x -> Code q r) -> Code q r Source # | |
Generic1 ((,,,,,,,,,,,,) a b c d e f g h i j k l :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances to1 :: forall (q :: Type -> Type) (x :: k0). Quote q => Rep1 ((,,,,,,,,,,,,) a b c d e f g h i j k l) (Code q) x -> Code q (a, b, c, d, e, f, g, h, i, j, k, l, x) Source # from1 :: forall (q :: Type -> Type) (x :: k0) r. Quote q => Code q (a, b, c, d, e, f, g, h, i, j, k, l, x) -> (Rep1 ((,,,,,,,,,,,,) a b c d e f g h i j k l) (Code q) x -> Code q r) -> Code q r Source # | |
Generic1 ((,,,,,,,,,,,,,) a b c d e f g h i j k l m :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances to1 :: forall (q :: Type -> Type) (x :: k0). Quote q => Rep1 ((,,,,,,,,,,,,,) a b c d e f g h i j k l m) (Code q) x -> Code q (a, b, c, d, e, f, g, h, i, j, k, l, m, x) Source # from1 :: forall (q :: Type -> Type) (x :: k0) r. Quote q => Code q (a, b, c, d, e, f, g, h, i, j, k, l, m, x) -> (Rep1 ((,,,,,,,,,,,,,) a b c d e f g h i j k l m) (Code q) x -> Code q r) -> Code q r Source # | |
Generic1 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances to1 :: forall (q :: Type -> Type) (x :: k0). Quote q => Rep1 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n) (Code q) x -> Code q (a, b, c, d, e, f, g, h, i, j, k, l, m, n, x) Source # from1 :: forall (q :: Type -> Type) (x :: k0) r. Quote q => Code q (a, b, c, d, e, f, g, h, i, j, k, l, m, n, x) -> (Rep1 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n) (Code q) x -> Code q r) -> Code q r Source # | |
Generic1 ((,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances to1 :: forall (q :: Type -> Type) (x :: k0). Quote q => Rep1 ((,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o) (Code q) x -> Code q (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, x) Source # from1 :: forall (q :: Type -> Type) (x :: k0) r. Quote q => Code q (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, x) -> (Rep1 ((,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o) (Code q) x -> Code q r) -> Code q r Source # | |
Generic1 ((,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances type Rep1 ((,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p) :: (Type -> Type) -> k -> Type Source # to1 :: forall (q :: Type -> Type) (x :: k0). Quote q => Rep1 ((,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p) (Code q) x -> Code q (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, x) Source # from1 :: forall (q :: Type -> Type) (x :: k0) r. Quote q => Code q (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, x) -> (Rep1 ((,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p) (Code q) x -> Code q r) -> Code q r Source # | |
Generic1 ((,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances type Rep1 ((,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q) :: (Type -> Type) -> k -> Type Source # to1 :: forall (q0 :: Type -> Type) (x :: k0). Quote q0 => Rep1 ((,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q) (Code q0) x -> Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, x) Source # from1 :: forall (q0 :: Type -> Type) (x :: k0) r. Quote q0 => Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, x) -> (Rep1 ((,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q) (Code q0) x -> Code q0 r) -> Code q0 r Source # | |
Generic1 ((,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances type Rep1 ((,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r) :: (Type -> Type) -> k -> Type Source # to1 :: forall (q0 :: Type -> Type) (x :: k0). Quote q0 => Rep1 ((,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r) (Code q0) x -> Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, x) Source # from1 :: forall (q0 :: Type -> Type) (x :: k0) r0. Quote q0 => Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, x) -> (Rep1 ((,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r) (Code q0) x -> Code q0 r0) -> Code q0 r0 Source # | |
Generic1 ((,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances type Rep1 ((,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s) :: (Type -> Type) -> k -> Type Source # to1 :: forall (q0 :: Type -> Type) (x :: k0). Quote q0 => Rep1 ((,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s) (Code q0) x -> Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, x) Source # from1 :: forall (q0 :: Type -> Type) (x :: k0) r0. Quote q0 => Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, x) -> (Rep1 ((,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s) (Code q0) x -> Code q0 r0) -> Code q0 r0 Source # | |
Generic1 ((,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances type Rep1 ((,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t) :: (Type -> Type) -> k -> Type Source # to1 :: forall (q0 :: Type -> Type) (x :: k0). Quote q0 => Rep1 ((,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t) (Code q0) x -> Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, x) Source # from1 :: forall (q0 :: Type -> Type) (x :: k0) r0. Quote q0 => Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, x) -> (Rep1 ((,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t) (Code q0) x -> Code q0 r0) -> Code q0 r0 Source # | |
Generic1 ((,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances type Rep1 ((,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u) :: (Type -> Type) -> k -> Type Source # to1 :: forall (q0 :: Type -> Type) (x :: k0). Quote q0 => Rep1 ((,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u) (Code q0) x -> Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, x) Source # from1 :: forall (q0 :: Type -> Type) (x :: k0) r0. Quote q0 => Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, x) -> (Rep1 ((,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u) (Code q0) x -> Code q0 r0) -> Code q0 r0 Source # | |
Generic1 ((,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances type Rep1 ((,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v) :: (Type -> Type) -> k -> Type Source # to1 :: forall (q0 :: Type -> Type) (x :: k0). Quote q0 => Rep1 ((,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v) (Code q0) x -> Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, x) Source # from1 :: forall (q0 :: Type -> Type) (x :: k0) r0. Quote q0 => Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, x) -> (Rep1 ((,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v) (Code q0) x -> Code q0 r0) -> Code q0 r0 Source # | |
Generic1 ((,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances type Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w) :: (Type -> Type) -> k -> Type Source # to1 :: forall (q0 :: Type -> Type) (x :: k0). Quote q0 => Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w) (Code q0) x -> Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) Source # from1 :: forall (q0 :: Type -> Type) (x :: k0) r0. Quote q0 => Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) -> (Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w) (Code q0) x -> Code q0 r0) -> Code q0 r0 Source # | |
Generic1 ((,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances type Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x) :: (Type -> Type) -> k -> Type Source # to1 :: forall (q0 :: Type -> Type) (x0 :: k0). Quote q0 => Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x) (Code q0) x0 -> Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, x0) Source # from1 :: forall (q0 :: Type -> Type) (x0 :: k0) r0. Quote q0 => Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, x0) -> (Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x) (Code q0) x0 -> Code q0 r0) -> Code q0 r0 Source # | |
Generic1 ((,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances type Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y) :: (Type -> Type) -> k -> Type Source # to1 :: forall (q0 :: Type -> Type) (x0 :: k0). Quote q0 => Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y) (Code q0) x0 -> Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, x0) Source # from1 :: forall (q0 :: Type -> Type) (x0 :: k0) r0. Quote q0 => Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, x0) -> (Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y) (Code q0) x0 -> Code q0 r0) -> Code q0 r0 Source # | |
Generic1 ((,,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y z :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances type Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y z) :: (Type -> Type) -> k -> Type Source # to1 :: forall (q0 :: Type -> Type) (x0 :: k0). Quote q0 => Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y z) (Code q0) x0 -> Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, x0) Source # from1 :: forall (q0 :: Type -> Type) (x0 :: k0) r0. Quote q0 => Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, x0) -> (Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y z) (Code q0) x0 -> Code q0 r0) -> Code q0 r0 Source # | |
Generic1 ((,,,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y z t26 :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances type Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y z t26) :: (Type -> Type) -> k -> Type Source # to1 :: forall (q0 :: Type -> Type) (x0 :: k0). Quote q0 => Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y z t26) (Code q0) x0 -> Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, x0) Source # from1 :: forall (q0 :: Type -> Type) (x0 :: k0) r0. Quote q0 => Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, x0) -> (Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y z t26) (Code q0) x0 -> Code q0 r0) -> Code q0 r0 Source # | |
Generic1 ((,,,,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y z t26 t27 :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances type Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y z t26 t27) :: (Type -> Type) -> k -> Type Source # to1 :: forall (q0 :: Type -> Type) (x0 :: k0). Quote q0 => Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y z t26 t27) (Code q0) x0 -> Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, x0) Source # from1 :: forall (q0 :: Type -> Type) (x0 :: k0) r0. Quote q0 => Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, x0) -> (Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y z t26 t27) (Code q0) x0 -> Code q0 r0) -> Code q0 r0 Source # | |
Generic1 ((,,,,,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y z t26 t27 t28 :: Type -> Type) Source # | |
Defined in Staged.GHC.Generics.Instances type Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y z t26 t27 t28) :: (Type -> Type) -> k -> Type Source # to1 :: forall (q0 :: Type -> Type) (x0 :: k0). Quote q0 => Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y z t26 t27 t28) (Code q0) x0 -> Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28, x0) Source # from1 :: forall (q0 :: Type -> Type) (x0 :: k0) r0. Quote q0 => Code q0 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28, x0) -> (Rep1 ((,,,,,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y z t26 t27 t28) (Code q0) x0 -> Code q0 r0) -> Code q0 r0 Source # |
TH Types
class Monad m => Quote (m :: Type -> Type) #
The Quote
class implements the minimal interface which is necessary for
desugaring quotations.
- The
Monad m
superclass is needed to stitch together the different AST fragments. newName
is used when desugaring binding structures such as lambdas to generate fresh names.
Therefore the type of an untyped quotation in GHC is `Quote m => m Exp`
For many years the type of a quotation was fixed to be `Q Exp` but by
more precisely specifying the minimal interface it enables the Exp
to
be extracted purely from the quotation without interacting with Q
.
Utilities
type family Translate (f :: k -> Type) :: (Type -> Type) -> k -> Type where ... Source #
Translate GHC.Generics Rep
type into our Rep
type.
Translate (M1 i c f) = M2 i c (Translate f) | |
Translate (K1 R c) = K2 c | |
Translate (f :+: g) = Translate f :++: Translate g | |
Translate (f :*: g) = Translate f :**: Translate g | |
Translate (Rec1 f) = Par2 :@@: f | |
Translate Par1 = Par2 | |
Translate U1 = U2 | |
Translate V1 = V2 | |
Translate (f :.: g) = TranslateComp (Par2 :@@: f) g | |
Translate x = TypeError ('Text "Translate error: " :<>: 'ShowType x) |