kind-generics-0.5.0.0: Generic programming in GHC style for arbitrary kinds and GADTs.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Generics.Kind.Examples

Documentation

data Tree a Source #

Constructors

Branch (Tree a) (Tree a) 
Leaf a 

Instances

Instances details
GenericK (Tree a :: Type) Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK (Tree a) :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (Tree a :@@: x) -> RepK (Tree a) x Source #

toK :: forall (x :: LoT k). RepK (Tree a) x -> Tree a :@@: x Source #

Generic (Tree a) Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type Rep (Tree a) :: Type -> Type #

Methods

from :: Tree a -> Rep (Tree a) x #

to :: Rep (Tree a) x -> Tree a #

GenericK Tree Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK Tree :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (Tree :@@: x) -> RepK Tree x Source #

toK :: forall (x :: LoT k). RepK Tree x -> Tree :@@: x Source #

type RepK (Tree a :: Type) Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK (Tree a :: Type) = SubstRep (RepK Tree) a
type Rep (Tree a) Source # 
Instance details

Defined in Generics.Kind.Examples

type Rep (Tree a) = D1 ('MetaData "Tree" "Generics.Kind.Examples" "kind-generics-0.5.0.0-AnGCroIa81x7qb6vZQx0Or" 'False) (C1 ('MetaCons "Branch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Tree a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Tree a))) :+: C1 ('MetaCons "Leaf" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
type RepK Tree Source # 
Instance details

Defined in Generics.Kind.Examples

data family HappyFamily t Source #

Instances

Instances details
GenericK (HappyFamily (Maybe a) :: Type) Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK (HappyFamily (Maybe a)) :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (HappyFamily (Maybe a) :@@: x) -> RepK (HappyFamily (Maybe a)) x Source #

toK :: forall (x :: LoT k). RepK (HappyFamily (Maybe a)) x -> HappyFamily (Maybe a) :@@: x Source #

GenericK (HappyFamily [a] :: Type) Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK (HappyFamily [a]) :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (HappyFamily [a] :@@: x) -> RepK (HappyFamily [a]) x Source #

toK :: forall (x :: LoT k). RepK (HappyFamily [a]) x -> HappyFamily [a] :@@: x Source #

GenericK HappyFamily Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK HappyFamily :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (HappyFamily :@@: x) -> RepK HappyFamily x Source #

toK :: forall (x :: LoT k). RepK HappyFamily x -> HappyFamily :@@: x Source #

type RepK (HappyFamily (Maybe a) :: Type) Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK (HappyFamily [a] :: Type) Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK (HappyFamily [a] :: Type) = Field ('Kon a :: Atom Type Type)
data HappyFamily (Maybe a) Source # 
Instance details

Defined in Generics.Kind.Examples

data HappyFamily [a] Source # 
Instance details

Defined in Generics.Kind.Examples

data HappyFamily [a] = HFL a
type RepK HappyFamily Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK HappyFamily = TypeError ('Text "Cannot describe this family uniformly") :: LoT (Type -> Type) -> Type

data SimpleIndex :: Type -> Type -> Type where Source #

Constructors

MkSimpleIndex :: [a] -> SimpleIndex [a] b 

Instances

Instances details
GenericK (SimpleIndex a b :: Type) Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK (SimpleIndex a b) :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (SimpleIndex a b :@@: x) -> RepK (SimpleIndex a b) x Source #

toK :: forall (x :: LoT k). RepK (SimpleIndex a b) x -> SimpleIndex a b :@@: x Source #

GenericK SimpleIndex Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK SimpleIndex :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (SimpleIndex :@@: x) -> RepK SimpleIndex x Source #

toK :: forall (x :: LoT k). RepK SimpleIndex x -> SimpleIndex :@@: x Source #

GenericK (SimpleIndex a :: Type -> Type) Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK (SimpleIndex a) :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (SimpleIndex a :@@: x) -> RepK (SimpleIndex a) x Source #

toK :: forall (x :: LoT k). RepK (SimpleIndex a) x -> SimpleIndex a :@@: x Source #

type RepK (SimpleIndex a b :: Type) Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK (SimpleIndex a b :: Type) = Exists Type ((('Kon a :: Atom (Type -> Type) Type) :~: ([] :$: (Var0 :: Atom (Type -> Type) Type))) :=>: Field ([] :$: (Var0 :: Atom (Type -> Type) Type)))
type RepK SimpleIndex Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK SimpleIndex = Exists Type (((Var1 :: Atom (Type -> Type -> Type -> Type) Type) :~: ([] :$: (Var0 :: Atom (Type -> Type -> Type -> Type) Type))) :=>: Field ([] :$: (Var0 :: Atom (Type -> Type -> Type -> Type) Type)))
type RepK (SimpleIndex a :: Type -> Type) Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK (SimpleIndex a :: Type -> Type) = Exists Type ((('Kon a :: Atom (Type -> Type -> Type) Type) :~: ([] :$: (Var0 :: Atom (Type -> Type -> Type) Type))) :=>: Field ([] :$: (Var0 :: Atom (Type -> Type -> Type) Type)))

data WeirdTree a where Source #

Constructors

WeirdBranch :: WeirdTree a -> WeirdTree a -> WeirdTree a 
WeirdLeaf :: Show a => t -> a -> WeirdTree a 

Instances

Instances details
GenericK WeirdTree Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK WeirdTree :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (WeirdTree :@@: x) -> RepK WeirdTree x Source #

toK :: forall (x :: LoT k). RepK WeirdTree x -> WeirdTree :@@: x Source #

type RepK WeirdTree Source # 
Instance details

Defined in Generics.Kind.Examples

data WeirdTreeR a where Source #

Constructors

WeirdBranchR :: WeirdTreeR a -> WeirdTreeR a -> WeirdTreeR a 
WeirdLeafR :: (Show a, Eq t, Typeable t) => t -> a -> WeirdTreeR a 

Instances

Instances details
GenericK (WeirdTreeR a :: Type) Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK (WeirdTreeR a) :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (WeirdTreeR a :@@: x) -> RepK (WeirdTreeR a) x Source #

toK :: forall (x :: LoT k). RepK (WeirdTreeR a) x -> WeirdTreeR a :@@: x Source #

GenericK WeirdTreeR Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK WeirdTreeR :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (WeirdTreeR :@@: x) -> RepK WeirdTreeR x Source #

toK :: forall (x :: LoT k). RepK WeirdTreeR x -> WeirdTreeR :@@: x Source #

type RepK (WeirdTreeR a :: Type) Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK WeirdTreeR Source # 
Instance details

Defined in Generics.Kind.Examples

data TTY m a where Source #

Constructors

WriteTTY :: String -> TTY m () 
ReadTTY :: TTY m String 

Instances

Instances details
GenericK (TTY m a :: Type) Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK (TTY m a) :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (TTY m a :@@: x) -> RepK (TTY m a) x Source #

toK :: forall (x :: LoT k). RepK (TTY m a) x -> TTY m a :@@: x Source #

type RepK (TTY m a :: Type) Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK (TTY m a :: Type) = ((('Kon a :: Atom Type Type) :~: ('Kon () :: Atom Type Type)) :=>: Field ('Kon String :: Atom Type Type)) :+: ((('Kon a :: Atom Type Type) :~: ('Kon String :: Atom Type Type)) :=>: (U1 :: LoT Type -> Type))

data T (a :: k) where Source #

Constructors

MkT :: forall (a :: Type). Maybe a -> T a 

Instances

Instances details
GenericK (T :: k -> Type) Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK T :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k0). (T :@@: x) -> RepK T x Source #

toK :: forall (x :: LoT k0). RepK T x -> T :@@: x Source #

type RepK (T :: k -> Type) Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK (T :: k -> Type) = Exists Type ((('Kon (k ~ Type) :: Atom (Type -> k -> Type) Constraint) :&: ((Var0 :: Atom (Type -> k -> Type) Type) :~~: (Var1 :: Atom (Type -> k -> Type) k))) :=>: Field (Maybe :$: (Var0 :: Atom (Type -> k -> Type) Type)))

data P k (a :: k) where Source #

Constructors

P :: forall k (a :: k). P k a 

Instances

Instances details
GenericK (P k :: k -> Type) Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK (P k) :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k0). (P k :@@: x) -> RepK (P k) x Source #

toK :: forall (x :: LoT k0). RepK (P k) x -> P k :@@: x Source #

type RepK (P k :: k -> Type) Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK (P k :: k -> Type) = U1 :: LoT (k -> Type) -> Type

data P' j (a :: k) where Source #

Constructors

P' :: forall k (a :: k). P' k a 

Instances

Instances details
GenericK (P' :: Type -> k -> Type) Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK P' :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k0). (P' :@@: x) -> RepK P' x Source #

toK :: forall (x :: LoT k0). RepK P' x -> P' :@@: x Source #

GenericK (P' j :: k -> Type) Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK (P' j) :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k0). (P' j :@@: x) -> RepK (P' j) x Source #

toK :: forall (x :: LoT k0). RepK (P' j) x -> P' j :@@: x Source #

type RepK (P' :: Type -> k -> Type) Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK (P' :: Type -> k -> Type) = (('Kon k :: Atom (Type -> k -> Type) Type) :~: (Var0 :: Atom (Type -> k -> Type) Type)) :=>: (U1 :: LoT (Type -> k -> Type) -> Type)
type RepK (P' j :: k -> Type) Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK (P' j :: k -> Type) = (('Kon k :: Atom (k -> Type) Type) :~: ('Kon j :: Atom (k -> Type) Type)) :=>: (U1 :: LoT (k -> Type) -> Type)

newtype Ranky Source #

Constructors

MkRanky (forall a. a -> a) 

Instances

Instances details
GenericK Ranky Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK Ranky :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (Ranky :@@: x) -> RepK Ranky x Source #

toK :: forall (x :: LoT k). RepK Ranky x -> Ranky :@@: x Source #

type RepK Ranky Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK Ranky = Field ('ForAll (((->) :$: (Var0 :: Atom (Type -> Type) Type)) :@: (Var0 :: Atom (Type -> Type) Type)))

newtype Ranky2 b Source #

Constructors

MkRanky2 ((forall a. a -> a) -> b) 

Instances

Instances details
GenericK Ranky2 Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK Ranky2 :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (Ranky2 :@@: x) -> RepK Ranky2 x Source #

toK :: forall (x :: LoT k). RepK Ranky2 x -> Ranky2 :@@: x Source #

type RepK Ranky2 Source # 
Instance details

Defined in Generics.Kind.Examples

data Shower a where Source #

Constructors

MkShower :: (Show a => a -> String) -> Shower a 

Instances

Instances details
GenericK Shower Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK Shower :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (Shower :@@: x) -> RepK Shower x Source #

toK :: forall (x :: LoT k). RepK Shower x -> Shower :@@: x Source #

type RepK Shower Source # 
Instance details

Defined in Generics.Kind.Examples

data Unboxed1 Source #

Constructors

MkUnboxed1 (# Int, Int #) 

newtype Hkd f a Source #

Constructors

Hkd (Eval (f a)) 

Instances

Instances details
GenericK (Hkd f a :: Type) Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK (Hkd f a) :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (Hkd f a :@@: x) -> RepK (Hkd f a) x Source #

toK :: forall (x :: LoT k). RepK (Hkd f a) x -> Hkd f a :@@: x Source #

GenericK (Hkd :: (k -> Exp Type) -> k -> Type) Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK Hkd :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k0). (Hkd :@@: x) -> RepK Hkd x Source #

toK :: forall (x :: LoT k0). RepK Hkd x -> Hkd :@@: x Source #

GenericK (Hkd f :: k -> Type) Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

type RepK (Hkd f) :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k0). (Hkd f :@@: x) -> RepK (Hkd f) x Source #

toK :: forall (x :: LoT k0). RepK (Hkd f) x -> Hkd f :@@: x Source #

type RepK (Hkd f a :: Type) Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK (Hkd f a :: Type) = Field ('Kon (Eval (f a)) :: Atom Type Type)
type RepK (Hkd :: (k -> Exp Type) -> k -> Type) Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK (Hkd :: (k -> Exp Type) -> k -> Type) = Field ('Eval ((Var0 :: Atom ((k -> Exp Type) -> k -> Type) (k -> Exp Type)) :@: (Var1 :: Atom ((k -> Exp Type) -> k -> Type) k)))
type RepK (Hkd f :: k -> Type) Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK (Hkd f :: k -> Type) = Field ('Eval (('Kon f :: Atom (k -> Type) (k -> Exp Type)) :@: (Var0 :: Atom (k -> Type) k)))

Orphan instances

GenericK (Maybe a :: Type) Source # 
Instance details

Associated Types

type RepK (Maybe a) :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (Maybe a :@@: x) -> RepK (Maybe a) x Source #

toK :: forall (x :: LoT k). RepK (Maybe a) x -> Maybe a :@@: x Source #

GenericK ([a] :: Type) Source # 
Instance details

Associated Types

type RepK [a] :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). ([a] :@@: x) -> RepK [a] x Source #

toK :: forall (x :: LoT k). RepK [a] x -> [a] :@@: x Source #

GenericK (Either a b :: Type) Source # 
Instance details

Associated Types

type RepK (Either a b) :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (Either a b :@@: x) -> RepK (Either a b) x Source #

toK :: forall (x :: LoT k). RepK (Either a b) x -> Either a b :@@: x Source #

GenericK Either Source # 
Instance details

Associated Types

type RepK Either :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (Either :@@: x) -> RepK Either x Source #

toK :: forall (x :: LoT k). RepK Either x -> Either :@@: x Source #

GenericK Maybe Source # 
Instance details

Associated Types

type RepK Maybe :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (Maybe :@@: x) -> RepK Maybe x Source #

toK :: forall (x :: LoT k). RepK Maybe x -> Maybe :@@: x Source #

GenericK [] Source # 
Instance details

Associated Types

type RepK [] :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). ([] :@@: x) -> RepK [] x Source #

toK :: forall (x :: LoT k). RepK [] x -> [] :@@: x Source #

GenericK (Either a :: Type -> Type) Source # 
Instance details

Associated Types

type RepK (Either a) :: LoT k -> Type Source #

Methods

fromK :: forall (x :: LoT k). (Either a :@@: x) -> RepK (Either a) x Source #

toK :: forall (x :: LoT k). RepK (Either a) x -> Either a :@@: x Source #