yoko-0.2: generic programming with disbanded constructors

Portabilitysee LANGUAGE pragmas (... GHC)
Stabilityexperimental
Maintainernicolas.frisby@gmail.com

Data.Yoko.Reduce

Description

A t-algebra reduces a disbanded t into a mediation of t.

Synopsis

Documentation

type Alg m t = Disbanded m t -> Med m tSource

A t-algebra reduces a disbanded t to the same mediation of t.

newtype Algebra m t Source

Constructors

Alg (Alg m t) 

Instances

data AlgebraU m t whereSource

Constructors

AlgebraU :: (DT t, AlgebraDT m t) => AlgebraU m t 

Instances

(DT t, AlgebraDT m t) => t ::: (AlgebraU m) 

class DT t => AlgebraDT m t whereSource

algebraDT determines the algebra from the type and mediator.

Methods

algebraDT :: Disbanded m t -> Med m tSource

class AlgebraUni m dcs Source

algebraUni determines the "algebra" from the type-sum and mediator.

Instances

AlgebraDC m dc => AlgebraUni m (N dc) 
(Med m (LeftmostRange ts) ~ Med m (LeftmostRange us), AlgebraUni m ts, AlgebraUni m us) => AlgebraUni m (:+ ts us) 

class DC dc => AlgebraDC m dc whereSource

algebraDC determines the "alegbra" from the constructor type and mediator.

Methods

algebraDC :: RMN m dc -> Med m (Range dc)Source