constrained-categories-0.3.1.0: Constrained clones of the category-theory type classes, using ConstraintKinds.

Copyright(c) 2013 Justus Sagemüller
LicenseGPL v3 (see COPYING)
Maintainer(@) sagemueller $ geo.uni-koeln.de
Safe HaskellTrustworthy
LanguageHaskell2010

Control.Arrow.Constrained

Contents

Description

Haskell's Arrows, going back to [Hughes 2000], combine multiple ideas from category theory:

  • They expand upon cartesian categories, by offering ways to combine arrows between simple objects to composite ones working on tuples (i.e. products) thereof.
  • They constitute a "profunctor" interface, allowing to "fmap" both covariantly over the second parameter, as well as contravariantly over the first. As in case of Control.Functor.Constrained, we wish the underlying category to fmap from not to be limited to Hask, so Arrow also has an extra parameter.

To facilitate these somewhat divergent needs, Arrow is split up in three classes. These do not even form an ordinary hierarchy, to allow categories to implement only one or the other aspect.

That's not the only significant difference of this module, compared to Control.Arrow:

  • Kleisli arrows are not defined here, but in Control.Monad.Constrained. Monads are really a much more specific concept than category arrows.
  • Some extra utilities are included that don't apparently have much to do with Arrow at all, but require the expanded cartesian-category tools and are therefore not in Control.Category.Constrained.

Synopsis

The Arrow type classes

type Arrow a k = (WellPointed a, EnhancedCat a k) Source #

class Cartesian a => Morphism a where Source #

Minimal complete definition

(***)

Methods

first :: (ObjectPair a b d, ObjectPair a c d) => a b c -> a (b, d) (c, d) Source #

second :: (ObjectPair a d b, ObjectPair a d c) => a b c -> a (d, b) (d, c) Source #

(***) :: (ObjectPair a b b', ObjectPair a c c') => a b c -> a b' c' -> a (b, b') (c, c') infixr 3 Source #

Instances

WellPointed k => Morphism (ReWellPointed k) Source # 

Methods

first :: (ObjectPair (ReWellPointed k) b d, ObjectPair (ReWellPointed k) c d) => ReWellPointed k b c -> ReWellPointed k (b, d) (c, d) Source #

second :: (ObjectPair (ReWellPointed k) d b, ObjectPair (ReWellPointed k) d c) => ReWellPointed k b c -> ReWellPointed k (d, b) (d, c) Source #

(***) :: (ObjectPair (ReWellPointed k) b b', ObjectPair (ReWellPointed k) c c') => ReWellPointed k b c -> ReWellPointed k b' c' -> ReWellPointed k (b, b') (c, c') Source #

PreArrow k => Morphism (RePreArrow k) Source # 

Methods

first :: (ObjectPair (RePreArrow k) b d, ObjectPair (RePreArrow k) c d) => RePreArrow k b c -> RePreArrow k (b, d) (c, d) Source #

second :: (ObjectPair (RePreArrow k) d b, ObjectPair (RePreArrow k) d c) => RePreArrow k b c -> RePreArrow k (d, b) (d, c) Source #

(***) :: (ObjectPair (RePreArrow k) b b', ObjectPair (RePreArrow k) c c') => RePreArrow k b c -> RePreArrow k b' c' -> RePreArrow k (b, b') (c, c') Source #

Morphism k => Morphism (ReMorphism k) Source # 

Methods

first :: (ObjectPair (ReMorphism k) b d, ObjectPair (ReMorphism k) c d) => ReMorphism k b c -> ReMorphism k (b, d) (c, d) Source #

second :: (ObjectPair (ReMorphism k) d b, ObjectPair (ReMorphism k) d c) => ReMorphism k b c -> ReMorphism k (d, b) (d, c) Source #

(***) :: (ObjectPair (ReMorphism k) b b', ObjectPair (ReMorphism k) c c') => ReMorphism k b c -> ReMorphism k b' c' -> ReMorphism k (b, b') (c, c') Source #

Morphism ((->) LiftedRep LiftedRep) Source # 

Methods

first :: (ObjectPair (LiftedRep -> LiftedRep) b d, ObjectPair (LiftedRep -> LiftedRep) c d) => (LiftedRep -> LiftedRep) b c -> (LiftedRep -> LiftedRep) (b, d) (c, d) Source #

second :: (ObjectPair (LiftedRep -> LiftedRep) d b, ObjectPair (LiftedRep -> LiftedRep) d c) => (LiftedRep -> LiftedRep) b c -> (LiftedRep -> LiftedRep) (d, b) (d, c) Source #

(***) :: (ObjectPair (LiftedRep -> LiftedRep) b b', ObjectPair (LiftedRep -> LiftedRep) c c') => (LiftedRep -> LiftedRep) b c -> (LiftedRep -> LiftedRep) b' c' -> (LiftedRep -> LiftedRep) (b, b') (c, c') Source #

(Morphism a, o (UnitObject a)) => Morphism (ConstrainedCategory a o) Source # 
(Monad m a, Morphism a, Curry a) => Morphism (Kleisli m a) Source # 

Methods

first :: (ObjectPair (Kleisli m a) b d, ObjectPair (Kleisli m a) c d) => Kleisli m a b c -> Kleisli m a (b, d) (c, d) Source #

second :: (ObjectPair (Kleisli m a) d b, ObjectPair (Kleisli m a) d c) => Kleisli m a b c -> Kleisli m a (d, b) (d, c) Source #

(***) :: (ObjectPair (Kleisli m a) b b', ObjectPair (Kleisli m a) c c') => Kleisli m a b c -> Kleisli m a b' c' -> Kleisli m a (b, b') (c, c') Source #

class Morphism a => PreArrow a where Source #

Unlike first, second, *** and arr, the fanout operation &&& has an intrinsic notion of "direction": it is basically equivalent to precomposing the result of *** with a b -> (b,b), but that is only available for arrows that generalise ordinary functions, in their native direction. ((b,b) ->b is specific to semigroups.) It is for this reason the only constituent class of Arrow that actually has "arrow" in its name.

In terms of category theory, this "direction" reflects the distinction between initial- and terminal objects. The latter are more interesting, basically what UnitObject is useful for. It gives rise to the tuple selector morphisms as well.

Minimal complete definition

(&&&), terminal, fst, snd

Methods

(&&&) :: (Object a b, ObjectPair a c c') => a b c -> a b c' -> a b (c, c') infixr 3 Source #

terminal :: Object a b => a b (UnitObject a) Source #

fst :: ObjectPair a x y => a (x, y) x Source #

snd :: ObjectPair a x y => a (x, y) y Source #

Instances

WellPointed k => PreArrow (ReWellPointed k) Source # 
PreArrow k => PreArrow (RePreArrow k) Source # 

Methods

(&&&) :: (Object (RePreArrow k) b, ObjectPair (RePreArrow k) c c') => RePreArrow k b c -> RePreArrow k b c' -> RePreArrow k b (c, c') Source #

terminal :: Object (RePreArrow k) b => RePreArrow k b (UnitObject (RePreArrow k)) Source #

fst :: ObjectPair (RePreArrow k) x y => RePreArrow k (x, y) x Source #

snd :: ObjectPair (RePreArrow k) x y => RePreArrow k (x, y) y Source #

PreArrow ((->) LiftedRep LiftedRep) Source # 
(PreArrow a, o (UnitObject a)) => PreArrow (ConstrainedCategory a o) Source # 
(Monad m a, PreArrow a, Curry a) => PreArrow (Kleisli m a) Source # 

Methods

(&&&) :: (Object (Kleisli m a) b, ObjectPair (Kleisli m a) c c') => Kleisli m a b c -> Kleisli m a b c' -> Kleisli m a b (c, c') Source #

terminal :: Object (Kleisli m a) b => Kleisli m a b (UnitObject (Kleisli m a)) Source #

fst :: ObjectPair (Kleisli m a) x y => Kleisli m a (x, y) x Source #

snd :: ObjectPair (Kleisli m a) x y => Kleisli m a (x, y) y Source #

class (PreArrow a, ObjectPoint a (UnitObject a)) => WellPointed a where Source #

WellPointed expresses the relation between your category's objects and the values of the Haskell data types (which is, after all, what objects are in this library). Specifically, this class allows you to "point" on specific objects, thus making out a value of that type as a point of the object.

Perhaps easier than thinking about what that's supposed to mean is noting this class contains const. Thus WellPointed is almost the traditional Arrow: it lets you express all the natural transformations and inject constant values, only you can't just promote arbitrary functions to arrows of the category.

Unlike with Morphism and PreArrow, a literal dual of WellPointed does not seem useful.

Minimal complete definition

unit, (globalElement | const)

Associated Types

type PointObject a x :: Constraint Source #

Methods

globalElement :: ObjectPoint a x => x -> a (UnitObject a) x Source #

unit :: CatTagged a (UnitObject a) Source #

const :: (Object a b, ObjectPoint a x) => x -> a b x Source #

Instances

WellPointed k => WellPointed (ReWellPointed k) Source # 
WellPointed ((->) LiftedRep LiftedRep) Source # 
(WellPointed a, o (UnitObject a)) => WellPointed (ConstrainedCategory a o) Source # 
(Monad m a, WellPointed a, ObjectPoint a (m (UnitObject a))) => WellPointed (Kleisli m a) Source # 

Associated Types

type PointObject (Kleisli m a :: * -> * -> *) x :: Constraint Source #

Methods

globalElement :: ObjectPoint (Kleisli m a) x => x -> Kleisli m a (UnitObject (Kleisli m a)) x Source #

unit :: CatTagged (Kleisli m a) (UnitObject (Kleisli m a)) Source #

const :: (Object (Kleisli m a) b, ObjectPoint (Kleisli m a) x) => x -> Kleisli m a b x Source #

type ObjectPoint k a = (Object k a, PointObject k a) Source #

class (Category a, Category k) => EnhancedCat a k where Source #

EnhancedCat a k means that the subcategory of k whose objects are also objects of a is a subcategory of a. This works like EnhancedCat', but does not require Object k ⊆ Object a.

Minimal complete definition

arr

Methods

arr :: (Object k b, Object k c, Object a b, Object a c) => k b c -> a b c Source #

Instances

Category k => EnhancedCat k k Source # 

Methods

arr :: (Object k b, Object k c, Object k b, Object k c) => k b c -> k b c Source #

WellPointed k => EnhancedCat (ReWellPointed k) k Source # 

Methods

arr :: (Object k b, Object k c, Object (ReWellPointed k) b, Object (ReWellPointed k) c) => k b c -> ReWellPointed k b c Source #

PreArrow k => EnhancedCat (RePreArrow k) k Source # 

Methods

arr :: (Object k b, Object k c, Object (RePreArrow k) b, Object (RePreArrow k) c) => k b c -> RePreArrow k b c Source #

Morphism k => EnhancedCat (ReMorphism k) k Source # 

Methods

arr :: (Object k b, Object k c, Object (ReMorphism k) b, Object (ReMorphism k) c) => k b c -> ReMorphism k b c Source #

Cartesian k => EnhancedCat (ReCartesian k) k Source # 

Methods

arr :: (Object k b, Object k c, Object (ReCartesian k) b, Object (ReCartesian k) c) => k b c -> ReCartesian k b c Source #

Category k => EnhancedCat (ReCategory k) k Source # 

Methods

arr :: (Object k b, Object k c, Object (ReCategory k) b, Object (ReCategory k) c) => k b c -> ReCategory k b c Source #

EnhancedCat (Coercion *) (Discrete *) Source # 

Methods

arr :: (Object (Discrete *) b, Object (Discrete *) c, Object (Coercion *) b, Object (Coercion *) c) => Discrete * b c -> Coercion * b c Source #

EnhancedCat (Discrete *) f => EnhancedCat (Discrete *) (ConstrainedCategory f o) Source # 
(EnhancedCat a k, o (UnitObject a)) => EnhancedCat (ConstrainedCategory a o) k Source # 

Methods

arr :: (Object k b, Object k c, Object (ConstrainedCategory a o) b, Object (ConstrainedCategory a o) c) => k b c -> ConstrainedCategory a o b c Source #

(Monad m a, Arrow a q, Cartesian a) => EnhancedCat (Kleisli m a) q Source # 

Methods

arr :: (Object q b, Object q c, Object (Kleisli m a) b, Object (Kleisli m a) c) => q b c -> Kleisli m a b c Source #

EnhancedCat ((->) LiftedRep LiftedRep) (Coercion *) Source # 
EnhancedCat ((->) LiftedRep LiftedRep) (Discrete *) Source # 
Category f => EnhancedCat (ConstrainedCategory f o) (Discrete *) Source # 
Function f => EnhancedCat ((->) LiftedRep LiftedRep) (ConstrainedCategory f o) Source # 

Dual / "choice" arrows

class CoCartesian a => MorphChoice a where Source #

Dual to Morphism, dealing with sums instead of products.

Minimal complete definition

(+++)

Methods

left :: (ObjectSum a b d, ObjectSum a c d) => a b c -> a (b + d) (c + d) Source #

right :: (ObjectSum a d b, ObjectSum a d c) => a b c -> a (d + b) (d + c) Source #

(+++) :: (ObjectSum a b b', ObjectSum a c c') => a b c -> a b' c' -> a (b + b') (c + c') Source #

Instances

MorphChoice ((->) LiftedRep LiftedRep) Source # 

Methods

left :: (ObjectSum (LiftedRep -> LiftedRep) b d, ObjectSum (LiftedRep -> LiftedRep) c d) => (LiftedRep -> LiftedRep) b c -> (LiftedRep -> LiftedRep) (b + d) (c + d) Source #

right :: (ObjectSum (LiftedRep -> LiftedRep) d b, ObjectSum (LiftedRep -> LiftedRep) d c) => (LiftedRep -> LiftedRep) b c -> (LiftedRep -> LiftedRep) (d + b) (d + c) Source #

(+++) :: (ObjectSum (LiftedRep -> LiftedRep) b b', ObjectSum (LiftedRep -> LiftedRep) c c') => (LiftedRep -> LiftedRep) b c -> (LiftedRep -> LiftedRep) b' c' -> (LiftedRep -> LiftedRep) (b + b') (c + c') Source #

(MorphChoice k, o (ZeroObject k)) => MorphChoice (ConstrainedCategory k o) Source # 
(Monad m k, Arrow k ((->) LiftedRep LiftedRep), Function k, PreArrChoice k, Object k (m (ZeroObject k)), Object k (m (m (ZeroObject k)))) => MorphChoice (Kleisli m k) Source #

Hask-Kleislis inherit more or less trivially ArrowChoice; however this does not generalise greatly well to non-function categories.

Methods

left :: (ObjectSum (Kleisli m k) b d, ObjectSum (Kleisli m k) c d) => Kleisli m k b c -> Kleisli m k (b + d) (c + d) Source #

right :: (ObjectSum (Kleisli m k) d b, ObjectSum (Kleisli m k) d c) => Kleisli m k b c -> Kleisli m k (d + b) (d + c) Source #

(+++) :: (ObjectSum (Kleisli m k) b b', ObjectSum (Kleisli m k) c c') => Kleisli m k b c -> Kleisli m k b' c' -> Kleisli m k (b + b') (c + c') Source #

class MorphChoice k => PreArrChoice k where Source #

Dual to PreArrow, this class deals with the vacuous initial (zero) objects, but also more usefully with choices / sums. This represents the most part of ArrowChoice.

Minimal complete definition

(|||), initial, coFst, coSnd

Methods

(|||) :: (ObjectSum k b b', Object k c) => k b c -> k b' c -> k (b + b') c infixr 2 Source #

initial :: Object k b => k (ZeroObject k) b Source #

This is basically absurd.

coFst :: ObjectSum k a b => k a (a + b) Source #

Perhaps lft and rgt would be more consequent names, but likely more confusing as well.

coSnd :: ObjectSum k a b => k b (a + b) Source #

Instances

PreArrChoice ((->) LiftedRep LiftedRep) Source # 
(PreArrChoice k, o (ZeroObject k)) => PreArrChoice (ConstrainedCategory k o) Source # 
(Monad m k, Arrow k ((->) LiftedRep LiftedRep), Function k, PreArrChoice k, Object k (m (ZeroObject k)), Object k (m (m (ZeroObject k)))) => PreArrChoice (Kleisli m k) Source # 

Methods

(|||) :: (ObjectSum (Kleisli m k) b b', Object (Kleisli m k) c) => Kleisli m k b c -> Kleisli m k b' c -> Kleisli m k (b + b') c Source #

initial :: Object (Kleisli m k) b => Kleisli m k (ZeroObject (Kleisli m k)) b Source #

coFst :: ObjectSum (Kleisli m k) a b => Kleisli m k a (a + b) Source #

coSnd :: ObjectSum (Kleisli m k) a b => Kleisli m k b (a + b) Source #

Distributive law between sum- and product objects

class (PreArrow k, PreArrChoice k) => SPDistribute k where Source #

Like in arithmetics, the distributive law a ⋅ (b + c) ≈ (a ⋅ b) + (a ⋅ c) holds for Haskell types – in the usual isomorphism sense. But like many such isomorphisms that are trivial to inline in Hask, this is not necessarily the case for general categories.

Minimal complete definition

distribute, unDistribute, boolAsSwitch, boolFromSwitch

Methods

distribute :: (ObjectSum k (a, b) (a, c), ObjectPair k a (b + c), ObjectSum k b c, PairObjects k a b, PairObjects k a c) => k (a, b + c) ((a, b) + (a, c)) Source #

unDistribute :: (ObjectSum k (a, b) (a, c), ObjectPair k a (b + c), ObjectSum k b c, PairObjects k a b, PairObjects k a c) => k ((a, b) + (a, c)) (a, b + c) Source #

boolAsSwitch :: (ObjectSum k a a, ObjectPair k Bool a) => k (Bool, a) (a + a) Source #

boolFromSwitch :: (ObjectSum k a a, ObjectPair k Bool a) => k (a + a) (Bool, a) Source #

Instances

SPDistribute ((->) LiftedRep LiftedRep) Source # 
(SPDistribute k, o (ZeroObject k), o (UnitObject k)) => SPDistribute (ConstrainedCategory k o) Source # 
(SPDistribute k, Monad m k, PreArrow (Kleisli m k), PreArrChoice (Kleisli m k)) => SPDistribute (Kleisli m k) Source # 

Methods

distribute :: (ObjectSum (Kleisli m k) (a, b) (a, c), ObjectPair (Kleisli m k) a (b + c), ObjectSum (Kleisli m k) b c, PairObjects (Kleisli m k) a b, PairObjects (Kleisli m k) a c) => Kleisli m k (a, b + c) ((a, b) + (a, c)) Source #

unDistribute :: (ObjectSum (Kleisli m k) (a, b) (a, c), ObjectPair (Kleisli m k) a (b + c), ObjectSum (Kleisli m k) b c, PairObjects (Kleisli m k) a b, PairObjects (Kleisli m k) a c) => Kleisli m k ((a, b) + (a, c)) (a, b + c) Source #

boolAsSwitch :: (ObjectSum (Kleisli m k) a a, ObjectPair (Kleisli m k) Bool a) => Kleisli m k (Bool, a) (a + a) Source #

boolFromSwitch :: (ObjectSum (Kleisli m k) a a, ObjectPair (Kleisli m k) Bool a) => Kleisli m k (a + a) (Bool, a) Source #

Function-like categories

type Function f = EnhancedCat (->) f Source #

Many categories have as morphisms essentially functions with extra properties: group homomorphisms, linear maps, continuous functions...

It makes sense to generalise the notion of function application to these morphisms; we can't do that for the simple juxtaposition writing f x, but it is possible for the function-application operator $.

This is particularly useful for ConstrainedCategory versions of Hask, where after all the morphisms are nothing but functions.

($) :: (Function f, Object f a, Object f b) => f a b -> a -> b infixr 0 Source #

Alternative composition notation

(>>>) :: (Category k, Object k a, Object k b, Object k c) => k a b -> k b c -> k a c infixr 1 Source #

(<<<) :: (Category k, Object k a, Object k b, Object k c) => k b c -> k a b -> k a c infixr 1 Source #

Proxies for cartesian categories

class (Morphism k, HasAgent k) => CartesianAgent k where Source #

Minimal complete definition

alg1to2, alg2to1, alg2to2

Methods

alg1to2 :: (Object k a, ObjectPair k b c) => (forall q. Object k q => AgentVal k q a -> (AgentVal k q b, AgentVal k q c)) -> k a (b, c) Source #

alg2to1 :: (ObjectPair k a b, Object k c) => (forall q. Object k q => AgentVal k q a -> AgentVal k q b -> AgentVal k q c) -> k (a, b) c Source #

alg2to2 :: (ObjectPair k a b, ObjectPair k c d) => (forall q. Object k q => AgentVal k q a -> AgentVal k q b -> (AgentVal k q c, AgentVal k q d)) -> k (a, b) (c, d) Source #

genericAgentCombine :: (HasAgent k, PreArrow k, Object k a, ObjectPair k b c, Object k d) => k (b, c) d -> GenericAgent k a b -> GenericAgent k a c -> GenericAgent k a d Source #

genericAlg1to2 :: (PreArrow k, u ~ UnitObject k, Object k a, ObjectPair k b c) => (forall q. Object k q => GenericAgent k q a -> (GenericAgent k q b, GenericAgent k q c)) -> k a (b, c) Source #

genericAlg2to1 :: (PreArrow k, u ~ UnitObject k, ObjectPair k a u, ObjectPair k a b, ObjectPair k b u, ObjectPair k b a) => (forall q. Object k q => GenericAgent k q a -> GenericAgent k q b -> GenericAgent k q c) -> k (a, b) c Source #

genericAlg2to2 :: (PreArrow k, u ~ UnitObject k, ObjectPair k a u, ObjectPair k a b, ObjectPair k c d, ObjectPair k b u, ObjectPair k b a) => (forall q. Object k q => GenericAgent k q a -> GenericAgent k q b -> (GenericAgent k q c, GenericAgent k q d)) -> k (a, b) (c, d) Source #

class (HasAgent k, AgentVal k a x ~ p a x) => PointAgent p k a x | p -> k where Source #

Minimal complete definition

point

Methods

point :: (Object k a, Object k x) => x -> p a x Source #

Misc utility

Conditionals

choose Source #

Arguments

:: (Arrow f (->), Function f, Object f Bool, Object f a) 
=> f (UnitObject f) a

"False" value

-> f (UnitObject f) a

"True" value

-> f Bool a 

Basically ifThenElse with inverted argument order, and "morphismised" arguments.

ifThenElse :: (EnhancedCat f (->), Function f, Object f Bool, Object f a, Object f (f a a), Object f (f a (f a a))) => Bool `f` (a `f` (a `f` a)) Source #

Coercions

follow :: (EnhancedCat k Coercion, Coercible a b, Object k a, Object k b) => p a b -> k a b Source #

Imitate a type change in a different category. This is usually possible for type changes that are no-ops at runtime, in particular for newtype wrappers.

flout :: (EnhancedCat k Coercion, Coercible b a, Object k a, Object k b) => p a b -> k b a Source #

The opposite of follow.

pretend :: (EnhancedCat k Coercion, Object k a, Object k b) => Coercion a b -> k a a -> k b b Source #

Wrap an endomorphism in inverse coercions, to have it work on any type that's representationally equivalent to the one in the morphism's signature. This is a specialised version of pretendLike.

swallow :: (EnhancedCat k Coercion, Object k a, Object k b) => Coercion b a -> k a a -> k b b Source #

Equivalent to pretend . sym.

pretendLike :: (EnhancedCat k Coercion, Coercible b a, Coercible c d, Object k a, Object k b, Object k c, Object k d) => p c d -> k a c -> k b d Source #

This works much like over: wrap a morphism in any coercions required so the result types match. This will often be too polymorphic for the type checker; consider using the more explicit follow and flout.

swallowLike :: (EnhancedCat k Coercion, Coercible b a, Coercible c d, Object k a, Object k b, Object k c, Object k d) => p b a -> k a c -> k b d Source #

Generalised coercion analogue of under.

Orphan instances

(SPDistribute k, ObjectSum k a a, ObjectPair k Bool a) => Isomorphic k ((+) a a) (Bool, a) Source # 

Methods

iso :: k (a + a) (Bool, a) Source #

(SPDistribute k, ObjectSum k a a, ObjectPair k Bool a) => Isomorphic k (Bool, a) ((+) a a) Source # 

Methods

iso :: k (Bool, a) (a + a) Source #

(SPDistribute k, ObjectSum k (a, b) (a, c), ObjectPair k a ((+) b c), ObjectSum k b c, PairObjects k a b, PairObjects k a c) => Isomorphic k ((+) (a, b) (a, c)) (a, (+) b c) Source # 

Methods

iso :: k ((a, b) + (a, c)) (a, b + c) Source #

(SPDistribute k, ObjectSum k (a, b) (a, c), ObjectPair k a ((+) b c), ObjectSum k b c, PairObjects k a b, PairObjects k a c) => Isomorphic k (a, (+) b c) ((+) (a, b) (a, c)) Source # 

Methods

iso :: k (a, b + c) ((a, b) + (a, c)) Source #