type-rig-0.1: Classes for the rig (sums and products) of types
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.TypeRig.Summable

Synopsis

Documentation

class Invariant f => Summable f where Source #

Composability via type sum Either and empty type Void.

Minimal complete definition

Nothing

Methods

rVoid :: f Void Source #

default rVoid :: Alternative f => f Void Source #

(<+++>) :: f a -> f b -> f (Either a b) infixr 2 Source #

default (<+++>) :: Alternative f => f a -> f b -> f (Either a b) Source #

Instances

Instances details
Summable Endo Source # 
Instance details

Defined in Data.TypeRig.Summable

Methods

rVoid :: Endo Void Source #

(<+++>) :: Endo a -> Endo b -> Endo (Either a b) Source #

Summable ReadPrec Source # 
Instance details

Defined in Data.TypeRig.Summable

Summable m => Summable (Kleisli m a) Source # 
Instance details

Defined in Data.TypeRig.Summable

Methods

rVoid :: Kleisli m a Void Source #

(<+++>) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a (Either a0 b) Source #