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

Data.TypeRig.Productable

Synopsis

Documentation

class Invariant f => Productable f where Source #

Composability via type product (,) and unit type ().

Minimal complete definition

Nothing

Methods

rUnit :: f () Source #

default rUnit :: Applicative f => f () Source #

(<***>) :: f a -> f b -> f (a, b) infixr 3 Source #

default (<***>) :: Applicative f => f a -> f b -> f (a, b) Source #

(***>) :: f () -> f a -> f a infixr 3 Source #

(<***) :: f a -> f () -> f a infixr 3 Source #

Instances

Instances details
Productable Endo Source # 
Instance details

Defined in Data.TypeRig.Productable

Methods

rUnit :: Endo () Source #

(<***>) :: Endo a -> Endo b -> Endo (a, b) Source #

(***>) :: Endo () -> Endo a -> Endo a Source #

(<***) :: Endo a -> Endo () -> Endo a Source #

Productable ReadPrec Source # 
Instance details

Defined in Data.TypeRig.Productable

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

Defined in Data.TypeRig.Productable

Methods

rUnit :: Kleisli m a () Source #

(<***>) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a (a0, b) Source #

(***>) :: Kleisli m a () -> Kleisli m a a0 -> Kleisli m a a0 Source #

(<***) :: Kleisli m a a0 -> Kleisli m a () -> Kleisli m a a0 Source #