Data.Diverse.Which

Which type

data Which xs

Single type

Construction

impossible

pick

pick0

pickOnly

pickL

pickN

Destruction

obvious

trial

trial'

trial0

trial0'

trialL

trialL'

trialN

trialN'

Multiple types

Injection

type Diversify branch tree

diversify

diversify'

diversify0

diversifyL

type DiversifyN indices branch tree

diversifyN

Inverse Injection

type Reinterpret branch tree

reinterpret

type Reinterpret' branch tree

reinterpret'

reinterpretL

reinterpretL'

type ReinterpretN' indices branch tree

reinterpretN'

Catamorphism

type Switch c r xs

data Switcher c r xs

which

switch

type SwitchN c r n xs

data SwitcherN c r n xs

whichN

switchN