kind-generics-0.2.0: Generic programming in GHC style for arbitrary kinds and GADTs.

Safe HaskellSafe
LanguageHaskell2010

Generics.Kind.Examples

Contents

Documentation

data Tree a Source #

Constructors

Branch (Tree a) (Tree a) 
Leaf a 
Instances
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 (a :&&: LoT0 :: LoT (Type -> Type)) Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

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

Methods

fromK :: (Tree :@@: (a :&&: LoT0)) -> RepK Tree (a :&&: LoT0) Source #

toK :: RepK Tree (a :&&: LoT0) -> Tree :@@: (a :&&: LoT0) Source #

Split (Tree a) Tree (a :&&: LoT0 :: LoT (Type -> Type)) Source # 
Instance details

Defined in Generics.Kind.Examples

type Rep (Tree a) Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK Tree Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK Tree = (F (Tree :$: (V0 :: Atom (Type -> Type) Type)) :*: F (Tree :$: (V0 :: Atom (Type -> Type) Type))) :+: F (V0 :: Atom (Type -> Type) Type)

data WeirdTree a where Source #

Constructors

WeirdBranch :: WeirdTree a -> WeirdTree a -> WeirdTree a 
WeirdLeaf :: Show a => t -> a -> WeirdTree a 
Instances
GenericK WeirdTree (a :&&: LoT0 :: LoT (Type -> Type)) Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

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

Methods

fromK :: (WeirdTree :@@: (a :&&: LoT0)) -> RepK WeirdTree (a :&&: LoT0) Source #

toK :: RepK WeirdTree (a :&&: LoT0) -> WeirdTree :@@: (a :&&: LoT0) Source #

Split (WeirdTree a) WeirdTree (a :&&: LoT0 :: LoT (Type -> Type)) Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK WeirdTree Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK WeirdTree = (F (WeirdTree :$: (V0 :: Atom (Type -> Type) Type)) :*: F (WeirdTree :$: (V0 :: Atom (Type -> Type) Type))) :+: E ((Show :$: (V1 :: Atom (Type -> Type -> Type) Type)) :=>: (F (V0 :: Atom (Type -> Type -> Type) Type) :*: F (V1 :: Atom (Type -> Type -> Type) Type)))

data WeirdTreeR a where Source #

Constructors

WeirdBranchR :: WeirdTreeR a -> WeirdTreeR a -> WeirdTreeR a 
WeirdLeafR :: (Show a, Typeable t, Eq t) => t -> a -> WeirdTreeR a 
Instances
GenericK WeirdTreeR (a :&&: LoT0 :: LoT (Type -> Type)) Source # 
Instance details

Defined in Generics.Kind.Examples

Associated Types

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

Methods

fromK :: (WeirdTreeR :@@: (a :&&: LoT0)) -> RepK WeirdTreeR (a :&&: LoT0) Source #

toK :: RepK WeirdTreeR (a :&&: LoT0) -> WeirdTreeR :@@: (a :&&: LoT0) Source #

Split (WeirdTreeR a) WeirdTreeR (a :&&: LoT0 :: LoT (Type -> Type)) Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK WeirdTreeR Source # 
Instance details

Defined in Generics.Kind.Examples

type RepK WeirdTreeR = (F (WeirdTreeR :$: (V0 :: Atom (Type -> Type) Type)) :*: F (WeirdTreeR :$: (V0 :: Atom (Type -> Type) Type))) :+: ERefl ((Show :$: (V1 :: Atom (Type -> Type -> Type) Type)) :=>: ((Eq :$: (V0 :: Atom (Type -> Type -> Type) Type)) :=>: (F (V0 :: Atom (Type -> Type -> Type) Type) :*: F (V1 :: Atom (Type -> Type -> Type) Type))))

Orphan instances

GenericK Maybe (a :&&: LoT0 :: LoT (Type -> Type)) Source # 
Instance details

Associated Types

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

Methods

fromK :: (Maybe :@@: (a :&&: LoT0)) -> RepK Maybe (a :&&: LoT0) Source #

toK :: RepK Maybe (a :&&: LoT0) -> Maybe :@@: (a :&&: LoT0) Source #

Split (Maybe a) Maybe (a :&&: LoT0 :: LoT (Type -> Type)) Source # 
Instance details