categories-0.54.0: categories from category-extras

Portabilitynon-portable (class-associated types)
Stabilityexperimental
MaintainerEdward Kmett <ekmett@gmail.com>

Control.Category.Distributive

Contents

Description

 

Synopsis

Distributive Categories

factor :: (PreCartesian ~>, PreCoCartesian ~>) => Sum ~> (Product ~> a b) (Product ~> a c) ~> Product ~> a (Sum ~> b c)Source

the canonical factoring morphism

 factor :: ( PreCartesian (~>)
         , (*) ~ Product (~>)
         , PreCoCartesian (~>)
         , (+) ~ Sum (~>) 
         ) => ((a * b) + (a * c)) ~> (a * (b + c))

class (PreCartesian ~>, PreCoCartesian ~>) => Distributive (~>) whereSource

Methods

distribute :: Product ~> a (Sum ~> b c) ~> Sum ~> (Product ~> a b) (Product ~> a c)Source

Instances