kind-generics-0.1.1.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
Functor Tree Source # 
Instance details

Defined in Generics.Kind.Examples

Methods

fmap :: (a -> b) -> Tree a -> Tree b #

(<$) :: a -> Tree b -> Tree a #

Eq a => Eq (Tree a) Source # 
Instance details

Defined in Generics.Kind.Examples

Methods

(==) :: Tree a -> Tree a -> Bool #

(/=) :: Tree a -> Tree a -> Bool #

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 #

KFunctor Tree (Co ': ([] :: [Variance])) (a :&&: LoT0 :: LoT (Type -> Type)) (b :&&: LoT0 :: LoT (Type -> Type)) Source # 
Instance details

Defined in Generics.Kind.Examples

Methods

kfmap :: Mappings (Co ': []) (a :&&: LoT0) (b :&&: LoT0) -> (Tree :@@: (a :&&: LoT0)) -> Tree :@@: (b :&&: LoT0)

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
Show b => KFunctor WeirdTree (Co ': ([] :: [Variance])) (a :&&: LoT0 :: LoT (Type -> Type)) (b :&&: LoT0 :: LoT (Type -> Type)) Source # 
Instance details

Defined in Generics.Kind.Examples

Methods

kfmap :: Mappings (Co ': []) (a :&&: LoT0) (b :&&: LoT0) -> (WeirdTree :@@: (a :&&: LoT0)) -> WeirdTree :@@: (b :&&: LoT0)

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
Eq a => Eq (WeirdTreeR a) Source # 
Instance details

Defined in Generics.Kind.Examples

Methods

(==) :: WeirdTreeR a -> WeirdTreeR a -> Bool #

(/=) :: WeirdTreeR a -> WeirdTreeR a -> Bool #

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

KFunctor Maybe (Co ': ([] :: [Variance])) (a :&&: LoT0 :: LoT (Type -> Type)) (b :&&: LoT0 :: LoT (Type -> Type)) Source # 
Instance details

Methods

kfmap :: Mappings (Co ': []) (a :&&: LoT0) (b :&&: LoT0) -> (Maybe :@@: (a :&&: LoT0)) -> Maybe :@@: (b :&&: LoT0)

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