packages feed

constrained-categories 0.3.0.1 → 0.3.1.0

raw patch · 5 files changed

+58/−1 lines, 5 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Control.Category.Constrained: type (+) = Either
- Control.Category.Constrained.Reified: CartesianAttachUnit :: ReCartesian k α (α, u)
- Control.Category.Constrained.Reified: CartesianCompo :: ReCartesian k α β -> ReCartesian k β γ -> ReCartesian k α γ
- Control.Category.Constrained.Reified: CartesianDetachUnit :: ReCartesian k (α, u) α
- Control.Category.Constrained.Reified: CartesianId :: ReCartesian k α α
- Control.Category.Constrained.Reified: CartesianRegroup :: ReCartesian k (α, (β, γ)) ((α, β), γ)
- Control.Category.Constrained.Reified: CartesianRegroup_ :: ReCartesian k ((α, β), γ) (α, (β, γ))
- Control.Category.Constrained.Reified: CartesianSwap :: ReCartesian k (α, β) (β, α)
- Control.Category.Constrained.Reified: CategoryCompo :: ReCategory k α β -> ReCategory k β γ -> ReCategory k α γ
- Control.Category.Constrained.Reified: CategoryId :: ReCategory k α α
- Control.Category.Constrained.Reified: MorphismAttachUnit :: ReMorphism k α (α, u)
- Control.Category.Constrained.Reified: MorphismCompo :: ReMorphism k α β -> ReMorphism k β γ -> ReMorphism k α γ
- Control.Category.Constrained.Reified: MorphismDetachUnit :: ReMorphism k (α, u) α
- Control.Category.Constrained.Reified: MorphismId :: ReMorphism k α α
- Control.Category.Constrained.Reified: MorphismPar :: ReMorphism k α β -> ReMorphism k γ δ -> ReMorphism k (α, γ) (β, δ)
- Control.Category.Constrained.Reified: MorphismRegroup :: ReMorphism k (α, (β, γ)) ((α, β), γ)
- Control.Category.Constrained.Reified: MorphismRegroup_ :: ReMorphism k ((α, β), γ) (α, (β, γ))
- Control.Category.Constrained.Reified: MorphismSwap :: ReMorphism k (α, β) (β, α)
- Control.Category.Constrained.Reified: PreArrowAttachUnit :: RePreArrow k α (α, u)
- Control.Category.Constrained.Reified: PreArrowCompo :: RePreArrow k α β -> RePreArrow k β γ -> RePreArrow k α γ
- Control.Category.Constrained.Reified: PreArrowDetachUnit :: RePreArrow k (α, u) α
- Control.Category.Constrained.Reified: PreArrowFanout :: RePreArrow k α β -> RePreArrow k α γ -> RePreArrow k α (β, γ)
- Control.Category.Constrained.Reified: PreArrowFst :: RePreArrow k (α, β) α
- Control.Category.Constrained.Reified: PreArrowId :: RePreArrow k α α
- Control.Category.Constrained.Reified: PreArrowPar :: RePreArrow k α β -> RePreArrow k γ δ -> RePreArrow k (α, γ) (β, δ)
- Control.Category.Constrained.Reified: PreArrowRegroup :: RePreArrow k (α, (β, γ)) ((α, β), γ)
- Control.Category.Constrained.Reified: PreArrowRegroup_ :: RePreArrow k ((α, β), γ) (α, (β, γ))
- Control.Category.Constrained.Reified: PreArrowSnd :: RePreArrow k (α, β) β
- Control.Category.Constrained.Reified: PreArrowSwap :: RePreArrow k (α, β) (β, α)
- Control.Category.Constrained.Reified: PreArrowTerminal :: RePreArrow k α (UnitObject k)
- Control.Category.Constrained.Reified: ReCartesian :: k α β -> ReCartesian k α β
- Control.Category.Constrained.Reified: ReCategory :: k α β -> ReCategory k α β
- Control.Category.Constrained.Reified: ReMorphism :: k α β -> ReMorphism k α β
- Control.Category.Constrained.Reified: RePreArrow :: k α β -> RePreArrow k α β
- Control.Category.Constrained.Reified: ReWellPointed :: k α β -> ReWellPointed k α β
- Control.Category.Constrained.Reified: WellPointedAttachUnit :: ReWellPointed k α (α, u)
- Control.Category.Constrained.Reified: WellPointedCompo :: ReWellPointed k α β -> ReWellPointed k β γ -> ReWellPointed k α γ
- Control.Category.Constrained.Reified: WellPointedConst :: α -> ReWellPointed k ν α
- Control.Category.Constrained.Reified: WellPointedDetachUnit :: ReWellPointed k (α, u) α
- Control.Category.Constrained.Reified: WellPointedFanout :: ReWellPointed k α β -> ReWellPointed k α γ -> ReWellPointed k α (β, γ)
- Control.Category.Constrained.Reified: WellPointedFst :: ReWellPointed k (α, β) α
- Control.Category.Constrained.Reified: WellPointedId :: ReWellPointed k α α
- Control.Category.Constrained.Reified: WellPointedPar :: ReWellPointed k α β -> ReWellPointed k γ δ -> ReWellPointed k (α, γ) (β, δ)
- Control.Category.Constrained.Reified: WellPointedRegroup :: ReWellPointed k (α, (β, γ)) ((α, β), γ)
- Control.Category.Constrained.Reified: WellPointedRegroup_ :: ReWellPointed k ((α, β), γ) (α, (β, γ))
- Control.Category.Constrained.Reified: WellPointedSnd :: ReWellPointed k (α, β) β
- Control.Category.Constrained.Reified: WellPointedSwap :: ReWellPointed k (α, β) (β, α)
- Control.Category.Constrained.Reified: WellPointedTerminal :: ReWellPointed k α (UnitObject k)
+ Control.Applicative.Constrained: infixl 4 <**>
+ Control.Arrow.Constrained: infixr 0 $
+ Control.Arrow.Constrained: infixr 1 <<<
+ Control.Arrow.Constrained: instance Control.Arrow.Constrained.EnhancedCat (->) Control.Category.Discrete.Discrete
+ Control.Arrow.Constrained: instance Control.Arrow.Constrained.EnhancedCat Control.Category.Discrete.Discrete f => Control.Arrow.Constrained.EnhancedCat Control.Category.Discrete.Discrete (Control.Category.Constrained.ConstrainedCategory f o)
+ Control.Arrow.Constrained: instance Control.Arrow.Constrained.EnhancedCat Data.Type.Coercion.Coercion Control.Category.Discrete.Discrete
+ Control.Arrow.Constrained: instance Control.Category.Constrained.Category f => Control.Arrow.Constrained.EnhancedCat (Control.Category.Constrained.ConstrainedCategory f o) Control.Category.Discrete.Discrete
+ Control.Arrow.Constrained: type PointObject a x = ();
+ Control.Arrow.Constrained: type family PointObject a x :: Constraint;
+ Control.Arrow.Constrained: }
+ Control.Category.Constrained: instance Control.Category.Constrained.Category Control.Category.Discrete.Discrete
+ Control.Category.Constrained: instance Control.Category.Constrained.HasAgent Control.Category.Discrete.Discrete
+ Control.Category.Constrained: type + = Either
+ Control.Category.Constrained: type AgentVal k a v = GenericAgent k a v;
+ Control.Category.Constrained: type MorphObjects k b c = ();
+ Control.Category.Constrained: type Object k o = ();
+ Control.Category.Constrained: type PairObjects k a b = ();
+ Control.Category.Constrained: type SumObjects k a b = ();
+ Control.Category.Constrained: type UnitObject k = ();
+ Control.Category.Constrained: type ZeroObject k = Void;
+ Control.Category.Constrained: type family AgentVal k a v :: *;
+ Control.Category.Constrained: }
+ Control.Category.Constrained.Reified: [CartesianAttachUnit] :: (Object k α, UnitObject k ~ u, ObjectPair k α u) => ReCartesian k α (α, u)
+ Control.Category.Constrained.Reified: [CartesianCompo] :: Object k β => ReCartesian k α β -> ReCartesian k β γ -> ReCartesian k α γ
+ Control.Category.Constrained.Reified: [CartesianDetachUnit] :: (Object k α, UnitObject k ~ u, ObjectPair k α u) => ReCartesian k (α, u) α
+ Control.Category.Constrained.Reified: [CartesianId] :: Object k α => ReCartesian k α α
+ Control.Category.Constrained.Reified: [CartesianRegroup] :: (ObjectPair k α β, ObjectPair k β γ, ObjectPair k α (β, γ), ObjectPair k (α, β) γ) => ReCartesian k (α, (β, γ)) ((α, β), γ)
+ Control.Category.Constrained.Reified: [CartesianRegroup_] :: (ObjectPair k α β, ObjectPair k β γ, ObjectPair k α (β, γ), ObjectPair k (α, β) γ) => ReCartesian k ((α, β), γ) (α, (β, γ))
+ Control.Category.Constrained.Reified: [CartesianSwap] :: (ObjectPair k α β, ObjectPair k β α) => ReCartesian k (α, β) (β, α)
+ Control.Category.Constrained.Reified: [CategoryCompo] :: Object k β => ReCategory k α β -> ReCategory k β γ -> ReCategory k α γ
+ Control.Category.Constrained.Reified: [CategoryId] :: Object k α => ReCategory k α α
+ Control.Category.Constrained.Reified: [MorphismAttachUnit] :: (Object k α, UnitObject k ~ u, ObjectPair k α u) => ReMorphism k α (α, u)
+ Control.Category.Constrained.Reified: [MorphismCompo] :: Object k β => ReMorphism k α β -> ReMorphism k β γ -> ReMorphism k α γ
+ Control.Category.Constrained.Reified: [MorphismDetachUnit] :: (Object k α, UnitObject k ~ u, ObjectPair k α u) => ReMorphism k (α, u) α
+ Control.Category.Constrained.Reified: [MorphismId] :: Object k α => ReMorphism k α α
+ Control.Category.Constrained.Reified: [MorphismPar] :: (ObjectPair k α γ, ObjectPair k β δ) => ReMorphism k α β -> ReMorphism k γ δ -> ReMorphism k (α, γ) (β, δ)
+ Control.Category.Constrained.Reified: [MorphismRegroup] :: (ObjectPair k α β, ObjectPair k β γ, ObjectPair k α (β, γ), ObjectPair k (α, β) γ) => ReMorphism k (α, (β, γ)) ((α, β), γ)
+ Control.Category.Constrained.Reified: [MorphismRegroup_] :: (ObjectPair k α β, ObjectPair k β γ, ObjectPair k α (β, γ), ObjectPair k (α, β) γ) => ReMorphism k ((α, β), γ) (α, (β, γ))
+ Control.Category.Constrained.Reified: [MorphismSwap] :: (ObjectPair k α β, ObjectPair k β α) => ReMorphism k (α, β) (β, α)
+ Control.Category.Constrained.Reified: [PreArrowAttachUnit] :: (Object k α, UnitObject k ~ u, ObjectPair k α u) => RePreArrow k α (α, u)
+ Control.Category.Constrained.Reified: [PreArrowCompo] :: Object k β => RePreArrow k α β -> RePreArrow k β γ -> RePreArrow k α γ
+ Control.Category.Constrained.Reified: [PreArrowDetachUnit] :: (Object k α, UnitObject k ~ u, ObjectPair k α u) => RePreArrow k (α, u) α
+ Control.Category.Constrained.Reified: [PreArrowFanout] :: (Object k α, ObjectPair k β γ) => RePreArrow k α β -> RePreArrow k α γ -> RePreArrow k α (β, γ)
+ Control.Category.Constrained.Reified: [PreArrowFst] :: ObjectPair k α β => RePreArrow k (α, β) α
+ Control.Category.Constrained.Reified: [PreArrowId] :: Object k α => RePreArrow k α α
+ Control.Category.Constrained.Reified: [PreArrowPar] :: (ObjectPair k α γ, ObjectPair k β δ) => RePreArrow k α β -> RePreArrow k γ δ -> RePreArrow k (α, γ) (β, δ)
+ Control.Category.Constrained.Reified: [PreArrowRegroup] :: (ObjectPair k α β, ObjectPair k β γ, ObjectPair k α (β, γ), ObjectPair k (α, β) γ) => RePreArrow k (α, (β, γ)) ((α, β), γ)
+ Control.Category.Constrained.Reified: [PreArrowRegroup_] :: (ObjectPair k α β, ObjectPair k β γ, ObjectPair k α (β, γ), ObjectPair k (α, β) γ) => RePreArrow k ((α, β), γ) (α, (β, γ))
+ Control.Category.Constrained.Reified: [PreArrowSnd] :: ObjectPair k α β => RePreArrow k (α, β) β
+ Control.Category.Constrained.Reified: [PreArrowSwap] :: (ObjectPair k α β, ObjectPair k β α) => RePreArrow k (α, β) (β, α)
+ Control.Category.Constrained.Reified: [PreArrowTerminal] :: Object k α => RePreArrow k α (UnitObject k)
+ Control.Category.Constrained.Reified: [ReCartesian] :: k α β -> ReCartesian k α β
+ Control.Category.Constrained.Reified: [ReCategory] :: k α β -> ReCategory k α β
+ Control.Category.Constrained.Reified: [ReMorphism] :: k α β -> ReMorphism k α β
+ Control.Category.Constrained.Reified: [RePreArrow] :: k α β -> RePreArrow k α β
+ Control.Category.Constrained.Reified: [ReWellPointed] :: k α β -> ReWellPointed k α β
+ Control.Category.Constrained.Reified: [WellPointedAttachUnit] :: (Object k α, UnitObject k ~ u, ObjectPair k α u) => ReWellPointed k α (α, u)
+ Control.Category.Constrained.Reified: [WellPointedCompo] :: Object k β => ReWellPointed k α β -> ReWellPointed k β γ -> ReWellPointed k α γ
+ Control.Category.Constrained.Reified: [WellPointedConst] :: (Object k ν, ObjectPoint k α) => α -> ReWellPointed k ν α
+ Control.Category.Constrained.Reified: [WellPointedDetachUnit] :: (Object k α, UnitObject k ~ u, ObjectPair k α u) => ReWellPointed k (α, u) α
+ Control.Category.Constrained.Reified: [WellPointedFanout] :: (Object k α, ObjectPair k β γ) => ReWellPointed k α β -> ReWellPointed k α γ -> ReWellPointed k α (β, γ)
+ Control.Category.Constrained.Reified: [WellPointedFst] :: ObjectPair k α β => ReWellPointed k (α, β) α
+ Control.Category.Constrained.Reified: [WellPointedId] :: Object k α => ReWellPointed k α α
+ Control.Category.Constrained.Reified: [WellPointedPar] :: (ObjectPair k α γ, ObjectPair k β δ) => ReWellPointed k α β -> ReWellPointed k γ δ -> ReWellPointed k (α, γ) (β, δ)
+ Control.Category.Constrained.Reified: [WellPointedRegroup] :: (ObjectPair k α β, ObjectPair k β γ, ObjectPair k α (β, γ), ObjectPair k (α, β) γ) => ReWellPointed k (α, (β, γ)) ((α, β), γ)
+ Control.Category.Constrained.Reified: [WellPointedRegroup_] :: (ObjectPair k α β, ObjectPair k β γ, ObjectPair k α (β, γ), ObjectPair k (α, β) γ) => ReWellPointed k ((α, β), γ) (α, (β, γ))
+ Control.Category.Constrained.Reified: [WellPointedSnd] :: ObjectPair k α β => ReWellPointed k (α, β) β
+ Control.Category.Constrained.Reified: [WellPointedSwap] :: (ObjectPair k α β, ObjectPair k β α) => ReWellPointed k (α, β) (β, α)
+ Control.Category.Constrained.Reified: [WellPointedTerminal] :: Object k α => ReWellPointed k α (UnitObject k)
+ Control.Category.Constrained.Reified.PolyPattern: infixr 1 :>>>
+ Control.Category.Constrained.Reified.PolyPattern: infixr 3 :&&&
+ Control.Category.Constrained.Reified.PolyPattern: type family SpecificCat k :: * -> * -> *;
+ Control.Category.Constrained.Reified.PolyPattern: }
+ Control.Category.Discrete: [Refl] :: Discrete a a
+ Control.Category.Discrete: data Discrete a b
+ Control.Category.Discrete: instance Control.Category.Category Control.Category.Discrete.Discrete
+ Control.Functor.Constrained: infixl 4 <$>
+ Control.Functor.Constrained: instance Control.Functor.Constrained.Functor ((,) a) Control.Category.Discrete.Discrete Control.Category.Discrete.Discrete
+ Control.Functor.Constrained: instance Control.Functor.Constrained.Functor ((->) a) Control.Category.Discrete.Discrete Control.Category.Discrete.Discrete
+ Control.Functor.Constrained: instance Control.Functor.Constrained.Functor (Data.Either.Either a) Control.Category.Discrete.Discrete Control.Category.Discrete.Discrete
+ Control.Functor.Constrained: instance Control.Functor.Constrained.Functor Data.Complex.Complex Control.Category.Discrete.Discrete Control.Category.Discrete.Discrete
+ Control.Functor.Constrained: instance Control.Functor.Constrained.Functor GHC.Base.Maybe Control.Category.Discrete.Discrete Control.Category.Discrete.Discrete
+ Control.Functor.Constrained: instance Control.Functor.Constrained.Functor GHC.Types.IO Control.Category.Discrete.Discrete Control.Category.Discrete.Discrete
+ Control.Functor.Constrained: instance Control.Functor.Constrained.Functor [] Control.Category.Discrete.Discrete Control.Category.Discrete.Discrete
+ Control.Monad.Constrained: infixl 1 >>
+ Control.Monad.Constrained: infixr 1 <=<
+ Data.Traversable.Constrained: type TraversalObject k t b = ();
+ Data.Traversable.Constrained: type family TraversalObject k t b :: Constraint;
+ Data.Traversable.Constrained: }
- Control.Applicative.Constrained: class (Monoidal f r t, Curry r, Curry t) => Applicative f r t where (<*>) = curry (fzipWith $ uncurry id)
+ Control.Applicative.Constrained: class (Monoidal f r t, Curry r, Curry t) => Applicative f r t
- Control.Arrow.Constrained: class (CoCartesian a) => MorphChoice a where left = (+++ id) right = (id +++)
+ Control.Arrow.Constrained: class (CoCartesian a) => MorphChoice a
- Control.Arrow.Constrained: class (Cartesian a) => Morphism a where first = (*** id) second = (id ***)
+ Control.Arrow.Constrained: class (Cartesian a) => Morphism a
- Control.Arrow.Constrained: class (PreArrow a, ObjectPoint a (UnitObject a)) => WellPointed a where type family PointObject a x :: Constraint PointObject a x = () globalElement = const const x = globalElement x . terminal
+ Control.Arrow.Constrained: class (PreArrow a, ObjectPoint a (UnitObject a)) => WellPointed a where {
- Control.Arrow.Constrained: coFst :: (PreArrChoice k, ObjectSum k a b) => k a (a + b)
+ Control.Arrow.Constrained: coFst :: (PreArrChoice k, (ObjectSum k a b)) => k a (a + b)
- Control.Arrow.Constrained: coSnd :: (PreArrChoice k, ObjectSum k a b) => k b (a + b)
+ Control.Arrow.Constrained: coSnd :: (PreArrChoice k, (ObjectSum k a b)) => k b (a + b)
- Control.Arrow.Constrained: fst :: (PreArrow a, ObjectPair a x y) => a (x, y) x
+ Control.Arrow.Constrained: fst :: (PreArrow a, (ObjectPair a x y)) => a (x, y) x
- Control.Arrow.Constrained: globalElement :: (WellPointed a, ObjectPoint a x) => x -> a (UnitObject a) x
+ Control.Arrow.Constrained: globalElement :: (WellPointed a, (ObjectPoint a x)) => x -> a (UnitObject a) x
- Control.Arrow.Constrained: initial :: (PreArrChoice k, Object k b) => k (ZeroObject k) b
+ Control.Arrow.Constrained: initial :: (PreArrChoice k, (Object k b)) => k (ZeroObject k) b
- Control.Arrow.Constrained: snd :: (PreArrow a, ObjectPair a x y) => a (x, y) y
+ Control.Arrow.Constrained: snd :: (PreArrow a, (ObjectPair a x y)) => a (x, y) y
- Control.Arrow.Constrained: terminal :: (PreArrow a, Object a b) => a b (UnitObject a)
+ Control.Arrow.Constrained: terminal :: (PreArrow a, (Object a b)) => a b (UnitObject a)
- Control.Category.Constrained: class (Category k, Monoid (UnitObject k), Object k (UnitObject k)) => Cartesian k where type family PairObjects k a b :: Constraint type family UnitObject k :: * PairObjects k a b = () UnitObject k = ()
+ Control.Category.Constrained: class (Category k, Monoid (UnitObject k), Object k (UnitObject k)) => Cartesian k where {
- Control.Category.Constrained: class Category k where type family Object k o :: Constraint Object k o = ()
+ Control.Category.Constrained: class Category k where {
- Control.Category.Constrained: class (Category k, Object k (ZeroObject k)) => CoCartesian k where type family SumObjects k a b :: Constraint type family ZeroObject k :: * SumObjects k a b = () ZeroObject k = Void
+ Control.Category.Constrained: class (Category k, Object k (ZeroObject k)) => CoCartesian k where {
- Control.Category.Constrained: class (Cartesian k) => Curry k where type family MorphObjects k b c :: Constraint MorphObjects k b c = () apply = uncurry id
+ Control.Category.Constrained: class (Cartesian k) => Curry k where {
- Control.Category.Constrained: class (Category k) => HasAgent k where type family AgentVal k a v :: * AgentVal k a v = GenericAgent k a v
+ Control.Category.Constrained: class (Category k) => HasAgent k where {
- Control.Category.Constrained.Reified.PolyPattern: class Category k => CRCategory k where type family SpecificCat k :: * -> * -> *
+ Control.Category.Constrained.Reified.PolyPattern: class Category k => CRCategory k where {
- Control.Monad.Constrained: fail :: (MonadFail m k, Object k (m a)) => k String (m a)
+ Control.Monad.Constrained: fail :: (MonadFail m k, (Object k (m a))) => k String (m a)
- Control.Monad.Constrained: fmplus :: (MonadPlus m k, ObjectPair k (m a) (m a)) => k (m a, m a) (m a)
+ Control.Monad.Constrained: fmplus :: (MonadPlus m k, (ObjectPair k (m a) (m a))) => k (m a, m a) (m a)
- Control.Monad.Constrained: forM :: (Traversable s t k l, Monoidal m k l, Function l, Object k b, Object k (t b), ObjectPair k b (t b), Object l a, Object l (s a), ObjectPair l (m b) (m (t b)), TraversalObject k t b) => s a -> (a `l` m b) -> m (t b)
+ Control.Monad.Constrained: forM :: forall s t k m a b l. (Traversable s t k l, Monoidal m k l, Function l, Object k b, Object k (t b), ObjectPair k b (t b), Object l a, Object l (s a), ObjectPair l (m b) (m (t b)), TraversalObject k t b) => s a -> (a `l` m b) -> m (t b)
- Control.Monad.Constrained: forM_ :: (Foldable t k l, Monoidal f l l, Monoidal f k k, Function l, Arrow k (->), Arrow l (->), ul ~ UnitObject l, uk ~ UnitObject k, uk ~ ul, ObjectPair l ul ul, ObjectPair l (f ul) (f ul), ObjectPair l (f ul) (t a), ObjectPair l ul (t a), ObjectPair l (t a) ul, ObjectPair l (f ul) a, ObjectPair k b (f b), ObjectPair k b ul, ObjectPair k uk uk, ObjectPair k (f uk) a, ObjectPair k (f uk) (f uk)) => t a -> a `k` f b -> f uk
+ Control.Monad.Constrained: forM_ :: forall t k l f a b uk ul. (Foldable t k l, Monoidal f l l, Monoidal f k k, Function l, Arrow k (->), Arrow l (->), ul ~ UnitObject l, uk ~ UnitObject k, uk ~ ul, ObjectPair l ul ul, ObjectPair l (f ul) (f ul), ObjectPair l (f ul) (t a), ObjectPair l ul (t a), ObjectPair l (t a) ul, ObjectPair l (f ul) a, ObjectPair k b (f b), ObjectPair k b ul, ObjectPair k uk uk, ObjectPair k (f uk) a, ObjectPair k (f uk) (f uk)) => t a -> a `k` f b -> f uk
- Control.Monad.Constrained: mapM_ :: (Foldable t k k, WellPointed k, Monoidal f k k, u ~ UnitObject k, ObjectPair k (f u) (t a), ObjectPair k (f u) a, ObjectPair k u (t a), ObjectPair k (t a) u, ObjectPair k (f u) (f u), ObjectPair k u u, ObjectPair k b u, Object k (f b)) => a `k` f b -> t a `k` f u
+ Control.Monad.Constrained: mapM_ :: forall t k o f a b u. (Foldable t k k, WellPointed k, Monoidal f k k, u ~ UnitObject k, ObjectPair k (f u) (t a), ObjectPair k (f u) a, ObjectPair k u (t a), ObjectPair k (t a) u, ObjectPair k (f u) (f u), ObjectPair k u u, ObjectPair k b u, Object k (f b)) => a `k` f b -> t a `k` f u
- Control.Monad.Constrained: sequence_ :: (Foldable t k l, Arrow k (->), Arrow l (->), uk ~ UnitObject k, ul ~ UnitObject l, uk ~ ul, Monoidal m k k, Monoidal m l l, ObjectPair k a uk, ObjectPair k (t (m a)) uk, ObjectPair k uk uk, ObjectPair k (m uk) (m uk), ObjectPair k (t (m a)) ul, ObjectPair l (m ul) (t (m a)), ObjectPair l ul (t (m a)), ObjectPair l (m uk) (t (m a)), ObjectPair l (t (m a)) ul, ObjectPair k (m uk) (m a)) => t (m a) `l` m uk
+ Control.Monad.Constrained: sequence_ :: forall t k l m a b uk ul. (Foldable t k l, Arrow k (->), Arrow l (->), uk ~ UnitObject k, ul ~ UnitObject l, uk ~ ul, Monoidal m k k, Monoidal m l l, ObjectPair k a uk, ObjectPair k (t (m a)) uk, ObjectPair k uk uk, ObjectPair k (m uk) (m uk), ObjectPair k (t (m a)) ul, ObjectPair l (m ul) (t (m a)), ObjectPair l ul (t (m a)), ObjectPair l (m uk) (t (m a)), ObjectPair l (t (m a)) ul, ObjectPair k (m uk) (m a)) => t (m a) `l` m uk
- Data.Foldable.Constrained: forM_ :: (Foldable t k l, Monoidal f l l, Monoidal f k k, Function l, Arrow k (->), Arrow l (->), ul ~ UnitObject l, uk ~ UnitObject k, uk ~ ul, ObjectPair l ul ul, ObjectPair l (f ul) (f ul), ObjectPair l (f ul) (t a), ObjectPair l ul (t a), ObjectPair l (t a) ul, ObjectPair l (f ul) a, ObjectPair k b (f b), ObjectPair k b ul, ObjectPair k uk uk, ObjectPair k (f uk) a, ObjectPair k (f uk) (f uk)) => t a -> a `k` f b -> f uk
+ Data.Foldable.Constrained: forM_ :: forall t k l f a b uk ul. (Foldable t k l, Monoidal f l l, Monoidal f k k, Function l, Arrow k (->), Arrow l (->), ul ~ UnitObject l, uk ~ UnitObject k, uk ~ ul, ObjectPair l ul ul, ObjectPair l (f ul) (f ul), ObjectPair l (f ul) (t a), ObjectPair l ul (t a), ObjectPair l (t a) ul, ObjectPair l (f ul) a, ObjectPair k b (f b), ObjectPair k b ul, ObjectPair k uk uk, ObjectPair k (f uk) a, ObjectPair k (f uk) (f uk)) => t a -> a `k` f b -> f uk
- Data.Foldable.Constrained: mapM_ :: (Foldable t k k, WellPointed k, Monoidal f k k, u ~ UnitObject k, ObjectPair k (f u) (t a), ObjectPair k (f u) a, ObjectPair k u (t a), ObjectPair k (t a) u, ObjectPair k (f u) (f u), ObjectPair k u u, ObjectPair k b u, Object k (f b)) => a `k` f b -> t a `k` f u
+ Data.Foldable.Constrained: mapM_ :: forall t k o f a b u. (Foldable t k k, WellPointed k, Monoidal f k k, u ~ UnitObject k, ObjectPair k (f u) (t a), ObjectPair k (f u) a, ObjectPair k u (t a), ObjectPair k (t a) u, ObjectPair k (f u) (f u), ObjectPair k u u, ObjectPair k b u, Object k (f b)) => a `k` f b -> t a `k` f u
- Data.Foldable.Constrained: sequence_ :: (Foldable t k l, Arrow k (->), Arrow l (->), uk ~ UnitObject k, ul ~ UnitObject l, uk ~ ul, Monoidal m k k, Monoidal m l l, ObjectPair k a uk, ObjectPair k (t (m a)) uk, ObjectPair k uk uk, ObjectPair k (m uk) (m uk), ObjectPair k (t (m a)) ul, ObjectPair l (m ul) (t (m a)), ObjectPair l ul (t (m a)), ObjectPair l (m uk) (t (m a)), ObjectPair l (t (m a)) ul, ObjectPair k (m uk) (m a)) => t (m a) `l` m uk
+ Data.Foldable.Constrained: sequence_ :: forall t k l m a b uk ul. (Foldable t k l, Arrow k (->), Arrow l (->), uk ~ UnitObject k, ul ~ UnitObject l, uk ~ ul, Monoidal m k k, Monoidal m l l, ObjectPair k a uk, ObjectPair k (t (m a)) uk, ObjectPair k uk uk, ObjectPair k (m uk) (m uk), ObjectPair k (t (m a)) ul, ObjectPair l (m ul) (t (m a)), ObjectPair l ul (t (m a)), ObjectPair l (m uk) (t (m a)), ObjectPair l (t (m a)) ul, ObjectPair k (m uk) (m a)) => t (m a) `l` m uk
- Data.Foldable.Constrained: traverse_ :: (Foldable t k l, PreArrow k, PreArrow l, Monoidal f l l, Monoidal f k k, ObjectPair l (f ul) (t a), ObjectPair k (f ul) a, ObjectPair l ul (t a), ObjectPair l (t a) ul, ObjectPair k b ul, Object k (f b), ObjectPair k (f ul) (f ul), ObjectPair k ul ul, uk ~ UnitObject k, ul ~ UnitObject l, uk ~ ul) => a `k` f b -> t a `l` f ul
+ Data.Foldable.Constrained: traverse_ :: forall t k l o f a b uk ul. (Foldable t k l, PreArrow k, PreArrow l, Monoidal f l l, Monoidal f k k, ObjectPair l (f ul) (t a), ObjectPair k (f ul) a, ObjectPair l ul (t a), ObjectPair l (t a) ul, ObjectPair k b ul, Object k (f b), ObjectPair k (f ul) (f ul), ObjectPair k ul ul, uk ~ UnitObject k, ul ~ UnitObject l, uk ~ ul) => a `k` f b -> t a `l` f ul
- Data.Traversable.Constrained: class (Category k, Category l, Functor s l l, Functor t k k) => Traversable s t k l | s k l -> t, t k l -> s, s t k -> l, s t l -> k where type family TraversalObject k t b :: Constraint TraversalObject k t b = () mapM = traverse sequence = traverse id
+ Data.Traversable.Constrained: class (Category k, Category l, Functor s l l, Functor t k k) => Traversable s t k l | s k l -> t, t k l -> s, s t k -> l, s t l -> k where {
- Data.Traversable.Constrained: forM :: (Traversable s t k l, Monoidal m k l, Function l, Object k b, Object k (t b), ObjectPair k b (t b), Object l a, Object l (s a), ObjectPair l (m b) (m (t b)), TraversalObject k t b) => s a -> (a `l` m b) -> m (t b)
+ Data.Traversable.Constrained: forM :: forall s t k m a b l. (Traversable s t k l, Monoidal m k l, Function l, Object k b, Object k (t b), ObjectPair k b (t b), Object l a, Object l (s a), ObjectPair l (m b) (m (t b)), TraversalObject k t b) => s a -> (a `l` m b) -> m (t b)

Files

Control/Arrow/Constrained.hs view
@@ -80,6 +80,8 @@  import qualified Control.Arrow as Arr +import Control.Category.Discrete+ infixr 1 >>>, <<< infixr 3 &&&, *** @@ -236,6 +238,13 @@ instance (Category k) => EnhancedCat k k where   arr = id +instance EnhancedCat (->) Discrete where+  arr Refl = id+instance EnhancedCat Coercion Discrete where+  arr Refl = id+instance Category f => EnhancedCat (ConstrainedCategory f o) Discrete where+  arr Refl = id+ -- | Many categories have as morphisms essentially /functions with extra properties/: --   group homomorphisms, linear maps, continuous functions... -- @@ -252,6 +261,8 @@ f $ x = arr f x  instance (Function f) => EnhancedCat (->) (ConstrainedCategory f o) where+  arr (ConstrainedMorphism q) = arr q+instance (EnhancedCat Discrete f) => EnhancedCat Discrete (ConstrainedCategory f o) where   arr (ConstrainedMorphism q) = arr q  instance EnhancedCat (->) Coercion where
Control/Category/Constrained.hs view
@@ -53,6 +53,8 @@ import Data.Type.Coercion import qualified Control.Category as Hask +import Control.Category.Discrete+ -- | In mathematics, a category is defined as a class of /objects/, plus a class of --   /morphisms/ between those objects. In Haskell, one traditionally works in --   the category @(->)@ (called /Hask/), in which /any Haskell type/ is an object. @@ -75,6 +77,10 @@  infixr 9 . +instance Category Discrete where+  id = Refl+  Refl . Refl = Refl+ instance Category (->) where   id = Prelude.id   (.) = (Prelude..)@@ -405,6 +411,9 @@   alg f = f   ($~) = ($) +instance HasAgent Discrete where+  alg = genericAlg+  ($~) = genericAgentMap  instance Category Coercion where   id = Hask.id
+ Control/Category/Discrete.hs view
@@ -0,0 +1,25 @@+-- |+-- Module      :  Control.Category.Discrete+-- Copyright   :  (c) 2018 Justus Sagemüller+-- License     :  GPL v3 (see COPYING)+-- Maintainer  :  (@) sagemueller $ geo.uni-koeln.de+-- +-- +{-# LANGUAGE GADTs                #-}+{-# LANGUAGE PolyKinds            #-}+++module Control.Category.Discrete where++import Control.Category++-- | The discrete category is the category with the minimum possible amount+--   of arrows: for any given type, there is 'id', and that's all.+--   You can use this to provide a proof that some endomorphism (of not closer+--   specified category) is the identity.+data Discrete a b where+   Refl :: Discrete a a++instance Category Discrete where+   id = Refl+   Refl . Refl = Refl
Control/Functor/Constrained.hs view
@@ -39,6 +39,9 @@ import Data.Type.Coercion import Data.Complex +import Control.Category.Discrete++ class ( Category r, Category t, Object t (f (UnitObject r)) )            => Functor f r t | f r -> t, f t -> r where   fmap :: (Object r a, Object t (f a), Object r b, Object t (f b))@@ -109,4 +112,12 @@ instance Functor ((,) a) Coercion Coercion where fmap Coercion = Coercion instance Functor IO Coercion Coercion where fmap Coercion = Coercion instance Functor Complex Coercion Coercion where fmap Coercion = Coercion++instance Functor [] Discrete Discrete where fmap Refl = Refl+instance Functor Maybe Discrete Discrete where fmap Refl = Refl+instance Functor (Either a) Discrete Discrete where fmap Refl = Refl+instance Functor ((->) a) Discrete Discrete where fmap Refl = Refl+instance Functor ((,) a) Discrete Discrete where fmap Refl = Refl+instance Functor IO Discrete Discrete where fmap Refl = Refl+instance Functor Complex Discrete Discrete where fmap Refl = Refl 
constrained-categories.cabal view
@@ -1,5 +1,5 @@ Name:                constrained-categories-Version:             0.3.0.1+Version:             0.3.1.0 Category:            control Synopsis:            Constrained clones of the category-theory type classes, using ConstraintKinds. Description:         Haskell has, and makes great use of, powerful facilities from category@@ -54,6 +54,7 @@                       Control.Arrow.Constrained                       Control.Monad.Constrained                       Control.Category.Hask+                      Control.Category.Discrete                       Control.Category.Constrained.Prelude                       Control.Category.Constrained.Reified                       Control.Category.Constrained.Reified.PolyPattern