packages feed

constrained-categories 0.2.0.0 → 0.2.1.0

raw patch · 8 files changed

+55/−18 lines, 8 filesdep ~basePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base

API changes (from Hackage documentation)

- Control.Applicative.Constrained: instance Applicative f => Applicative f (->) (->)
- Control.Applicative.Constrained: instance Applicative f => Monoidal f (->) (->)
- Control.Arrow.Constrained: instance (Arrow a k, o (UnitObject a)) => EnhancedCat (ConstrainedCategory a o) k
- Control.Arrow.Constrained: instance (MorphChoice k, o (ZeroObject k)) => MorphChoice (ConstrainedCategory k o)
- Control.Arrow.Constrained: instance (Morphism a, o (UnitObject a)) => Morphism (ConstrainedCategory a o)
- Control.Arrow.Constrained: instance (PreArrChoice k, o (ZeroObject k)) => PreArrChoice (ConstrainedCategory k o)
- Control.Arrow.Constrained: instance (PreArrow a, o (UnitObject a)) => PreArrow (ConstrainedCategory a o)
- Control.Arrow.Constrained: instance (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)
- Control.Arrow.Constrained: instance (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))
- Control.Arrow.Constrained: instance (SPDistribute k, ObjectSum k a a, ObjectPair k Bool a) => Isomorphic k (Bool, a) (a + a)
- Control.Arrow.Constrained: instance (SPDistribute k, ObjectSum k a a, ObjectPair k Bool a) => Isomorphic k (a + a) (Bool, a)
- Control.Arrow.Constrained: instance (SPDistribute k, o (ZeroObject k), o (UnitObject k)) => SPDistribute (ConstrainedCategory k o)
- Control.Arrow.Constrained: instance (WellPointed a, o (UnitObject a)) => WellPointed (ConstrainedCategory a o)
- Control.Arrow.Constrained: instance Category k => EnhancedCat k k
- Control.Arrow.Constrained: instance Function f => EnhancedCat (->) (ConstrainedCategory f o)
- Control.Arrow.Constrained: instance MorphChoice (->)
- Control.Arrow.Constrained: instance Morphism (->)
- Control.Arrow.Constrained: instance PreArrChoice (->)
- Control.Arrow.Constrained: instance PreArrow (->)
- Control.Arrow.Constrained: instance SPDistribute (->)
- Control.Arrow.Constrained: instance WellPointed (->)
- Control.Category.Constrained: instance (Cartesian f, o (UnitObject f)) => Cartesian (ConstrainedCategory f o)
- Control.Category.Constrained: instance (Cartesian k, Object k a, ObjectPair k a b, ObjectPair k b c, ObjectPair k a (b, c), ObjectPair k (a, b) c, Object k c) => Isomorphic k ((a, b), c) (a, (b, c))
- Control.Category.Constrained: instance (Cartesian k, Object k a, ObjectPair k a b, ObjectPair k b c, ObjectPair k a (b, c), ObjectPair k (a, b) c, Object k c) => Isomorphic k (a, (b, c)) ((a, b), c)
- Control.Category.Constrained: instance (Cartesian k, Object k a, u ~ UnitObject k, ObjectPair k a u) => Isomorphic k (a, u) a
- Control.Category.Constrained: instance (Cartesian k, Object k a, u ~ UnitObject k, ObjectPair k a u) => Isomorphic k a (a, u)
- Control.Category.Constrained: instance (Cartesian k, Object k a, u ~ UnitObject k, ObjectPair k a u, ObjectPair k u a, Object k (u, a), Object k (a, u)) => Isomorphic k (u, a) a
- Control.Category.Constrained: instance (Cartesian k, Object k a, u ~ UnitObject k, ObjectPair k a u, ObjectPair k u a, Object k (u, a), Object k (a, u)) => Isomorphic k a (u, a)
- Control.Category.Constrained: instance (CoCartesian f, o (ZeroObject f)) => CoCartesian (ConstrainedCategory f o)
- Control.Category.Constrained: instance (CoCartesian k, Object k a, ObjectSum k a b, ObjectSum k b c, ObjectSum k a (b + c), ObjectSum k (a + b) c, Object k c) => Isomorphic k ((a + b) + c) (a + (b + c))
- Control.Category.Constrained: instance (CoCartesian k, Object k a, ObjectSum k a b, ObjectSum k b c, ObjectSum k a (b + c), ObjectSum k (a + b) c, Object k c) => Isomorphic k (a + (b + c)) ((a + b) + c)
- Control.Category.Constrained: instance (CoCartesian k, Object k a, u ~ ZeroObject k, ObjectSum k a u) => Isomorphic k (a + u) a
- Control.Category.Constrained: instance (CoCartesian k, Object k a, u ~ ZeroObject k, ObjectSum k a u) => Isomorphic k a (a + u)
- Control.Category.Constrained: instance (CoCartesian k, Object k a, u ~ ZeroObject k, ObjectSum k a u, ObjectSum k u a, Object k (u + a), Object k (a + u)) => Isomorphic k (u + a) a
- Control.Category.Constrained: instance (CoCartesian k, Object k a, u ~ ZeroObject k, ObjectSum k a u, ObjectSum k u a, Object k (u + a), Object k (a + u)) => Isomorphic k a (u + a)
- Control.Category.Constrained: instance (Curry f, o (UnitObject f)) => Curry (ConstrainedCategory f o)
- Control.Category.Constrained: instance Cartesian (->)
- Control.Category.Constrained: instance Category (->)
- Control.Category.Constrained: instance Category k => Category (ConstrainedCategory k isObj)
- Control.Category.Constrained: instance CoCartesian (->)
- Control.Category.Constrained: instance Curry (->)
- Control.Category.Constrained: instance HasAgent (->)
- Control.Category.Constrained: runGenericAgent :: GenericAgent k a v -> k a v
- Control.Functor.Constrained: instance (Functor [] k k, o [UnitObject k]) => Functor [] (ConstrainedCategory k o) (ConstrainedCategory k o)
- Control.Functor.Constrained: instance (o (), o [()], o Void, o [Void]) => SumToProduct [] (ConstrainedCategory (->) o) (ConstrainedCategory (->) o)
- Control.Functor.Constrained: instance Functor f => Functor f (->) (->)
- Control.Functor.Constrained: instance SumToProduct [] (->) (->)
- Control.Monad.Constrained: instance (Applicative m, Monad m) => Monad m (->)
- Control.Monad.Constrained: instance (Monad m a, Arrow a (->), Function a) => Curry (Kleisli m a)
- Control.Monad.Constrained: instance (Monad m a, Arrow a q, Cartesian a) => EnhancedCat (Kleisli m a) q
- Control.Monad.Constrained: instance (Monad m a, Cartesian a) => Cartesian (Kleisli m a)
- Control.Monad.Constrained: instance (Monad m a, Morphism a, Curry a) => Morphism (Kleisli m a)
- Control.Monad.Constrained: instance (Monad m a, PreArrow a, Curry a) => PreArrow (Kleisli m a)
- Control.Monad.Constrained: instance (Monad m a, WellPointed a, ObjectPoint a (m (UnitObject a))) => WellPointed (Kleisli m a)
- Control.Monad.Constrained: instance (Monad m k, Arrow k (->), Function k, PreArrChoice k, Object k (m (ZeroObject k)), Object k (m (m (ZeroObject k)))) => MorphChoice (Kleisli m k)
- Control.Monad.Constrained: instance (Monad m k, Arrow k (->), Function k, PreArrChoice k, Object k (m (ZeroObject k)), Object k (m (m (ZeroObject k)))) => PreArrChoice (Kleisli m k)
- Control.Monad.Constrained: instance (Monad m k, CoCartesian k, Object k (m (ZeroObject k)), Object k (m (m (ZeroObject k)))) => CoCartesian (Kleisli m k)
- Control.Monad.Constrained: instance (MonadPlus m, Applicative m) => MonadFail m (->)
- Control.Monad.Constrained: instance (MonadPlus m, Applicative m) => MonadPlus m (->)
- Control.Monad.Constrained: instance (MonadPlus m, Applicative m) => MonadZero m (->)
- Control.Monad.Constrained: instance (SPDistribute k, Monad m k, PreArrow (Kleisli m k), PreArrChoice (Kleisli m k)) => SPDistribute (Kleisli m k)
- Control.Monad.Constrained: instance Monad m k => Category (Kleisli m k)
- Control.Monad.Constrained: runKleisli :: Kleisli m k a b -> k a (m b)
- Data.Foldable.Constrained: instance (Category k, Object k a) => Monoid (Endo' k a)
- Data.Foldable.Constrained: instance (Foldable f s t, WellPointed s, WellPointed t, Functor f (ConstrainedCategory s o) (ConstrainedCategory t o)) => Foldable f (ConstrainedCategory s o) (ConstrainedCategory t o)
- Data.Foldable.Constrained: instance (Monoidal f k k, Function k, u ~ UnitObject k, Monoid u, ObjectPair k u u, ObjectPair k (f u) (f u), Object k (f u, f u)) => Monoid (Monoidal_ k k f u)
- Data.Foldable.Constrained: instance Foldable Maybe (->) (->)
- Data.Foldable.Constrained: instance Foldable [] (->) (->)
- Data.Traversable.Constrained: instance (Arrow k (->), WellPointed k, Function k, Functor Maybe k k) => Traversable Maybe Maybe k k
- Data.Traversable.Constrained: instance (Arrow k (->), WellPointed k, Function k, Functor [] k k) => Traversable [] [] k k
+ Control.Applicative.Constrained: instance GHC.Base.Applicative f => Control.Applicative.Constrained.Applicative f (->) (->)
+ Control.Applicative.Constrained: instance GHC.Base.Applicative f => Control.Applicative.Constrained.Monoidal f (->) (->)
+ Control.Arrow.Constrained: instance (Control.Arrow.Constrained.Arrow a k, o (Control.Category.Constrained.UnitObject a)) => Control.Arrow.Constrained.EnhancedCat (Control.Category.Constrained.ConstrainedCategory a o) k
+ Control.Arrow.Constrained: instance (Control.Arrow.Constrained.MorphChoice k, o (Control.Category.Constrained.ZeroObject k)) => Control.Arrow.Constrained.MorphChoice (Control.Category.Constrained.ConstrainedCategory k o)
+ Control.Arrow.Constrained: instance (Control.Arrow.Constrained.Morphism a, o (Control.Category.Constrained.UnitObject a)) => Control.Arrow.Constrained.Morphism (Control.Category.Constrained.ConstrainedCategory a o)
+ Control.Arrow.Constrained: instance (Control.Arrow.Constrained.PreArrChoice k, o (Control.Category.Constrained.ZeroObject k)) => Control.Arrow.Constrained.PreArrChoice (Control.Category.Constrained.ConstrainedCategory k o)
+ Control.Arrow.Constrained: instance (Control.Arrow.Constrained.PreArrow a, o (Control.Category.Constrained.UnitObject a)) => Control.Arrow.Constrained.PreArrow (Control.Category.Constrained.ConstrainedCategory a o)
+ Control.Arrow.Constrained: instance (Control.Arrow.Constrained.SPDistribute k, Control.Category.Constrained.ObjectSum k (a, b) (a, c), Control.Category.Constrained.ObjectPair k a (b Control.Category.Constrained.+ c), Control.Category.Constrained.ObjectSum k b c, Control.Category.Constrained.PairObjects k a b, Control.Category.Constrained.PairObjects k a c) => Control.Category.Constrained.Isomorphic k ((a, b) Control.Category.Constrained.+ (a, c)) (a, b Control.Category.Constrained.+ c)
+ Control.Arrow.Constrained: instance (Control.Arrow.Constrained.SPDistribute k, Control.Category.Constrained.ObjectSum k (a, b) (a, c), Control.Category.Constrained.ObjectPair k a (b Control.Category.Constrained.+ c), Control.Category.Constrained.ObjectSum k b c, Control.Category.Constrained.PairObjects k a b, Control.Category.Constrained.PairObjects k a c) => Control.Category.Constrained.Isomorphic k (a, b Control.Category.Constrained.+ c) ((a, b) Control.Category.Constrained.+ (a, c))
+ Control.Arrow.Constrained: instance (Control.Arrow.Constrained.SPDistribute k, Control.Category.Constrained.ObjectSum k a a, Control.Category.Constrained.ObjectPair k GHC.Types.Bool a) => Control.Category.Constrained.Isomorphic k (GHC.Types.Bool, a) (a Control.Category.Constrained.+ a)
+ Control.Arrow.Constrained: instance (Control.Arrow.Constrained.SPDistribute k, Control.Category.Constrained.ObjectSum k a a, Control.Category.Constrained.ObjectPair k GHC.Types.Bool a) => Control.Category.Constrained.Isomorphic k (a Control.Category.Constrained.+ a) (GHC.Types.Bool, a)
+ Control.Arrow.Constrained: instance (Control.Arrow.Constrained.SPDistribute k, o (Control.Category.Constrained.ZeroObject k), o (Control.Category.Constrained.UnitObject k)) => Control.Arrow.Constrained.SPDistribute (Control.Category.Constrained.ConstrainedCategory k o)
+ Control.Arrow.Constrained: instance (Control.Arrow.Constrained.WellPointed a, o (Control.Category.Constrained.UnitObject a)) => Control.Arrow.Constrained.WellPointed (Control.Category.Constrained.ConstrainedCategory a o)
+ Control.Arrow.Constrained: instance Control.Arrow.Constrained.Function f => Control.Arrow.Constrained.EnhancedCat (->) (Control.Category.Constrained.ConstrainedCategory f o)
+ Control.Arrow.Constrained: instance Control.Arrow.Constrained.MorphChoice (->)
+ Control.Arrow.Constrained: instance Control.Arrow.Constrained.Morphism (->)
+ Control.Arrow.Constrained: instance Control.Arrow.Constrained.PreArrChoice (->)
+ Control.Arrow.Constrained: instance Control.Arrow.Constrained.PreArrow (->)
+ Control.Arrow.Constrained: instance Control.Arrow.Constrained.SPDistribute (->)
+ Control.Arrow.Constrained: instance Control.Arrow.Constrained.WellPointed (->)
+ Control.Arrow.Constrained: instance Control.Category.Constrained.Category k => Control.Arrow.Constrained.EnhancedCat k k
+ Control.Category.Constrained: [runGenericAgent] :: GenericAgent k a v -> k a v
+ Control.Category.Constrained: instance (Control.Category.Constrained.Cartesian f, o (Control.Category.Constrained.UnitObject f)) => Control.Category.Constrained.Cartesian (Control.Category.Constrained.ConstrainedCategory f o)
+ Control.Category.Constrained: instance (Control.Category.Constrained.Cartesian k, Control.Category.Constrained.Object k a, Control.Category.Constrained.ObjectPair k a b, Control.Category.Constrained.ObjectPair k b c, Control.Category.Constrained.ObjectPair k a (b, c), Control.Category.Constrained.ObjectPair k (a, b) c, Control.Category.Constrained.Object k c) => Control.Category.Constrained.Isomorphic k ((a, b), c) (a, (b, c))
+ Control.Category.Constrained: instance (Control.Category.Constrained.Cartesian k, Control.Category.Constrained.Object k a, Control.Category.Constrained.ObjectPair k a b, Control.Category.Constrained.ObjectPair k b c, Control.Category.Constrained.ObjectPair k a (b, c), Control.Category.Constrained.ObjectPair k (a, b) c, Control.Category.Constrained.Object k c) => Control.Category.Constrained.Isomorphic k (a, (b, c)) ((a, b), c)
+ Control.Category.Constrained: instance (Control.Category.Constrained.Cartesian k, Control.Category.Constrained.Object k a, u ~ Control.Category.Constrained.UnitObject k, Control.Category.Constrained.ObjectPair k a u) => Control.Category.Constrained.Isomorphic k (a, u) a
+ Control.Category.Constrained: instance (Control.Category.Constrained.Cartesian k, Control.Category.Constrained.Object k a, u ~ Control.Category.Constrained.UnitObject k, Control.Category.Constrained.ObjectPair k a u) => Control.Category.Constrained.Isomorphic k a (a, u)
+ Control.Category.Constrained: instance (Control.Category.Constrained.Cartesian k, Control.Category.Constrained.Object k a, u ~ Control.Category.Constrained.UnitObject k, Control.Category.Constrained.ObjectPair k a u, Control.Category.Constrained.ObjectPair k u a, Control.Category.Constrained.Object k (u, a), Control.Category.Constrained.Object k (a, u)) => Control.Category.Constrained.Isomorphic k (u, a) a
+ Control.Category.Constrained: instance (Control.Category.Constrained.Cartesian k, Control.Category.Constrained.Object k a, u ~ Control.Category.Constrained.UnitObject k, Control.Category.Constrained.ObjectPair k a u, Control.Category.Constrained.ObjectPair k u a, Control.Category.Constrained.Object k (u, a), Control.Category.Constrained.Object k (a, u)) => Control.Category.Constrained.Isomorphic k a (u, a)
+ Control.Category.Constrained: instance (Control.Category.Constrained.CoCartesian f, o (Control.Category.Constrained.ZeroObject f)) => Control.Category.Constrained.CoCartesian (Control.Category.Constrained.ConstrainedCategory f o)
+ Control.Category.Constrained: instance (Control.Category.Constrained.CoCartesian k, Control.Category.Constrained.Object k a, Control.Category.Constrained.ObjectSum k a b, Control.Category.Constrained.ObjectSum k b c, Control.Category.Constrained.ObjectSum k a (b Control.Category.Constrained.+ c), Control.Category.Constrained.ObjectSum k (a Control.Category.Constrained.+ b) c, Control.Category.Constrained.Object k c) => Control.Category.Constrained.Isomorphic k ((a Control.Category.Constrained.+ b) Control.Category.Constrained.+ c) (a Control.Category.Constrained.+ (b Control.Category.Constrained.+ c))
+ Control.Category.Constrained: instance (Control.Category.Constrained.CoCartesian k, Control.Category.Constrained.Object k a, Control.Category.Constrained.ObjectSum k a b, Control.Category.Constrained.ObjectSum k b c, Control.Category.Constrained.ObjectSum k a (b Control.Category.Constrained.+ c), Control.Category.Constrained.ObjectSum k (a Control.Category.Constrained.+ b) c, Control.Category.Constrained.Object k c) => Control.Category.Constrained.Isomorphic k (a Control.Category.Constrained.+ (b Control.Category.Constrained.+ c)) ((a Control.Category.Constrained.+ b) Control.Category.Constrained.+ c)
+ Control.Category.Constrained: instance (Control.Category.Constrained.CoCartesian k, Control.Category.Constrained.Object k a, u ~ Control.Category.Constrained.ZeroObject k, Control.Category.Constrained.ObjectSum k a u) => Control.Category.Constrained.Isomorphic k (a Control.Category.Constrained.+ u) a
+ Control.Category.Constrained: instance (Control.Category.Constrained.CoCartesian k, Control.Category.Constrained.Object k a, u ~ Control.Category.Constrained.ZeroObject k, Control.Category.Constrained.ObjectSum k a u) => Control.Category.Constrained.Isomorphic k a (a Control.Category.Constrained.+ u)
+ Control.Category.Constrained: instance (Control.Category.Constrained.CoCartesian k, Control.Category.Constrained.Object k a, u ~ Control.Category.Constrained.ZeroObject k, Control.Category.Constrained.ObjectSum k a u, Control.Category.Constrained.ObjectSum k u a, Control.Category.Constrained.Object k (u Control.Category.Constrained.+ a), Control.Category.Constrained.Object k (a Control.Category.Constrained.+ u)) => Control.Category.Constrained.Isomorphic k (u Control.Category.Constrained.+ a) a
+ Control.Category.Constrained: instance (Control.Category.Constrained.CoCartesian k, Control.Category.Constrained.Object k a, u ~ Control.Category.Constrained.ZeroObject k, Control.Category.Constrained.ObjectSum k a u, Control.Category.Constrained.ObjectSum k u a, Control.Category.Constrained.Object k (u Control.Category.Constrained.+ a), Control.Category.Constrained.Object k (a Control.Category.Constrained.+ u)) => Control.Category.Constrained.Isomorphic k a (u Control.Category.Constrained.+ a)
+ Control.Category.Constrained: instance (Control.Category.Constrained.Curry f, o (Control.Category.Constrained.UnitObject f)) => Control.Category.Constrained.Curry (Control.Category.Constrained.ConstrainedCategory f o)
+ Control.Category.Constrained: instance Control.Category.Constrained.Cartesian (->)
+ Control.Category.Constrained: instance Control.Category.Constrained.Category (->)
+ Control.Category.Constrained: instance Control.Category.Constrained.Category k => Control.Category.Constrained.Category (Control.Category.Constrained.ConstrainedCategory k isObj)
+ Control.Category.Constrained: instance Control.Category.Constrained.CoCartesian (->)
+ Control.Category.Constrained: instance Control.Category.Constrained.Curry (->)
+ Control.Category.Constrained: instance Control.Category.Constrained.HasAgent (->)
+ Control.Functor.Constrained: instance (Control.Functor.Constrained.Functor [] k k, o [Control.Category.Constrained.UnitObject k]) => Control.Functor.Constrained.Functor [] (Control.Category.Constrained.ConstrainedCategory k o) (Control.Category.Constrained.ConstrainedCategory k o)
+ Control.Functor.Constrained: instance (o (), o [()], o Data.Void.Void, o [Data.Void.Void]) => Control.Functor.Constrained.SumToProduct [] (Control.Category.Constrained.ConstrainedCategory (->) o) (Control.Category.Constrained.ConstrainedCategory (->) o)
+ Control.Functor.Constrained: instance Control.Functor.Constrained.SumToProduct [] (->) (->)
+ Control.Functor.Constrained: instance GHC.Base.Functor f => Control.Functor.Constrained.Functor f (->) (->)
+ Control.Monad.Constrained: [runKleisli] :: Kleisli m k a b -> k a (m b)
+ Control.Monad.Constrained: filterM :: (PreArrow k, Monad m k, SumToProduct c k k, EndoTraversable c k, ObjectPair k Bool a, Object k (c a), Object k (m (c a)), ObjectPair k (Bool, a) (c (Bool, a)), ObjectPair k (m Bool) (m a), ObjectPair k (m (Bool, a)) (m (c (Bool, a))), PointObject k (c (Bool, a))) => a `k` m Bool -> c a `k` m (c a)
+ Control.Monad.Constrained: instance (Control.Arrow.Constrained.SPDistribute k, Control.Monad.Constrained.Monad m k, Control.Arrow.Constrained.PreArrow (Control.Monad.Constrained.Kleisli m k), Control.Arrow.Constrained.PreArrChoice (Control.Monad.Constrained.Kleisli m k)) => Control.Arrow.Constrained.SPDistribute (Control.Monad.Constrained.Kleisli m k)
+ Control.Monad.Constrained: instance (Control.Monad.Constrained.Monad m a, Control.Arrow.Constrained.Arrow a (->), Control.Arrow.Constrained.Function a) => Control.Category.Constrained.Curry (Control.Monad.Constrained.Kleisli m a)
+ Control.Monad.Constrained: instance (Control.Monad.Constrained.Monad m a, Control.Arrow.Constrained.Arrow a q, Control.Category.Constrained.Cartesian a) => Control.Arrow.Constrained.EnhancedCat (Control.Monad.Constrained.Kleisli m a) q
+ Control.Monad.Constrained: instance (Control.Monad.Constrained.Monad m a, Control.Arrow.Constrained.Morphism a, Control.Category.Constrained.Curry a) => Control.Arrow.Constrained.Morphism (Control.Monad.Constrained.Kleisli m a)
+ Control.Monad.Constrained: instance (Control.Monad.Constrained.Monad m a, Control.Arrow.Constrained.PreArrow a, Control.Category.Constrained.Curry a) => Control.Arrow.Constrained.PreArrow (Control.Monad.Constrained.Kleisli m a)
+ Control.Monad.Constrained: instance (Control.Monad.Constrained.Monad m a, Control.Arrow.Constrained.WellPointed a, Control.Arrow.Constrained.ObjectPoint a (m (Control.Category.Constrained.UnitObject a))) => Control.Arrow.Constrained.WellPointed (Control.Monad.Constrained.Kleisli m a)
+ Control.Monad.Constrained: instance (Control.Monad.Constrained.Monad m a, Control.Category.Constrained.Cartesian a) => Control.Category.Constrained.Cartesian (Control.Monad.Constrained.Kleisli m a)
+ Control.Monad.Constrained: instance (Control.Monad.Constrained.Monad m k, Control.Arrow.Constrained.Arrow k (->), Control.Arrow.Constrained.Function k, Control.Arrow.Constrained.PreArrChoice k, Control.Category.Constrained.Object k (m (Control.Category.Constrained.ZeroObject k)), Control.Category.Constrained.Object k (m (m (Control.Category.Constrained.ZeroObject k)))) => Control.Arrow.Constrained.MorphChoice (Control.Monad.Constrained.Kleisli m k)
+ Control.Monad.Constrained: instance (Control.Monad.Constrained.Monad m k, Control.Arrow.Constrained.Arrow k (->), Control.Arrow.Constrained.Function k, Control.Arrow.Constrained.PreArrChoice k, Control.Category.Constrained.Object k (m (Control.Category.Constrained.ZeroObject k)), Control.Category.Constrained.Object k (m (m (Control.Category.Constrained.ZeroObject k)))) => Control.Arrow.Constrained.PreArrChoice (Control.Monad.Constrained.Kleisli m k)
+ Control.Monad.Constrained: instance (Control.Monad.Constrained.Monad m k, Control.Category.Constrained.CoCartesian k, Control.Category.Constrained.Object k (m (Control.Category.Constrained.ZeroObject k)), Control.Category.Constrained.Object k (m (m (Control.Category.Constrained.ZeroObject k)))) => Control.Category.Constrained.CoCartesian (Control.Monad.Constrained.Kleisli m k)
+ Control.Monad.Constrained: instance (GHC.Base.Applicative m, GHC.Base.Monad m) => Control.Monad.Constrained.Monad m (->)
+ Control.Monad.Constrained: instance (GHC.Base.MonadPlus m, GHC.Base.Applicative m) => Control.Monad.Constrained.MonadFail m (->)
+ Control.Monad.Constrained: instance (GHC.Base.MonadPlus m, GHC.Base.Applicative m) => Control.Monad.Constrained.MonadPlus m (->)
+ Control.Monad.Constrained: instance (GHC.Base.MonadPlus m, GHC.Base.Applicative m) => Control.Monad.Constrained.MonadZero m (->)
+ Control.Monad.Constrained: instance Control.Monad.Constrained.Monad m k => Control.Category.Constrained.Category (Control.Monad.Constrained.Kleisli m k)
+ Data.Foldable.Constrained: instance (Control.Applicative.Constrained.Monoidal f k k, Control.Arrow.Constrained.Function k, u ~ Control.Category.Constrained.UnitObject k, GHC.Base.Monoid u, Control.Category.Constrained.ObjectPair k u u, Control.Category.Constrained.ObjectPair k (f u) (f u), Control.Category.Constrained.Object k (f u, f u)) => GHC.Base.Monoid (Data.Foldable.Constrained.Monoidal_ k k f u)
+ Data.Foldable.Constrained: instance (Control.Category.Constrained.Category k, Control.Category.Constrained.Object k a) => GHC.Base.Monoid (Data.Foldable.Constrained.Endo' k a)
+ Data.Foldable.Constrained: instance (Data.Foldable.Constrained.Foldable f s t, Control.Arrow.Constrained.WellPointed s, Control.Arrow.Constrained.WellPointed t, Control.Functor.Constrained.Functor f (Control.Category.Constrained.ConstrainedCategory s o) (Control.Category.Constrained.ConstrainedCategory t o)) => Data.Foldable.Constrained.Foldable f (Control.Category.Constrained.ConstrainedCategory s o) (Control.Category.Constrained.ConstrainedCategory t o)
+ Data.Foldable.Constrained: instance Data.Foldable.Constrained.Foldable GHC.Base.Maybe (->) (->)
+ Data.Foldable.Constrained: instance Data.Foldable.Constrained.Foldable [] (->) (->)
+ Data.Traversable.Constrained: instance (Control.Arrow.Constrained.Arrow k (->), Control.Arrow.Constrained.WellPointed k, Control.Arrow.Constrained.Function k, Control.Functor.Constrained.Functor GHC.Base.Maybe k k) => Data.Traversable.Constrained.Traversable GHC.Base.Maybe GHC.Base.Maybe k k
+ Data.Traversable.Constrained: instance (Control.Arrow.Constrained.Arrow k (->), Control.Arrow.Constrained.WellPointed k, Control.Arrow.Constrained.Function k, Control.Functor.Constrained.Functor [] k k) => Data.Traversable.Constrained.Traversable [] [] k k
+ Data.Traversable.Constrained: type EndoTraversable t k = Traversable t t k k
- Control.Arrow.Constrained: class Category k => EnhancedCat a k
+ Control.Arrow.Constrained: class (Category k) => EnhancedCat a k
- Control.Arrow.Constrained: class CoCartesian a => MorphChoice a where left = (+++ id) right = (id +++)
+ Control.Arrow.Constrained: class (CoCartesian a) => MorphChoice a where left = (+++ id) right = (id +++)
- Control.Arrow.Constrained: class Cartesian a => Morphism a where first = (*** id) second = (id ***)
+ Control.Arrow.Constrained: class (Cartesian a) => Morphism a where first = (*** id) second = (id ***)
- Control.Arrow.Constrained: class MorphChoice k => PreArrChoice k
+ Control.Arrow.Constrained: class (MorphChoice k) => PreArrChoice k
- Control.Arrow.Constrained: class Morphism a => PreArrow a
+ Control.Arrow.Constrained: class (Morphism a) => PreArrow a
- Control.Arrow.Constrained: class (PreArrow a, ObjectPoint a (UnitObject a)) => WellPointed a where type family PointObject a x :: Constraint type instance PointObject a x = () globalElement = const const x = globalElement x . terminal
+ 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.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 :: * type instance PairObjects k a b = () type instance UnitObject k = ()
+ 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 where type family Object k o :: Constraint type instance Object k o = ()
+ Control.Category.Constrained: class Category k where type family Object k o :: Constraint Object k o = ()
- Control.Category.Constrained: class (Category k, Object k (ZeroObject k)) => CoCartesian k where type family SumObjects k a b :: Constraint type family ZeroObject k :: * type instance SumObjects k a b = () type instance ZeroObject k = Void
+ 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 Cartesian k => Curry k where type family MorphObjects k b c :: Constraint type instance MorphObjects k b c = () apply = uncurry id
+ 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 Category k => HasAgent k where type family AgentVal k a v :: * type instance AgentVal k a v = GenericAgent k a v
+ 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 => Isomorphic k a b
+ Control.Category.Constrained: class (Category k) => Isomorphic k a b
- Control.Category.Constrained: inCategoryOf :: Category k => k a b -> k c d -> k a b
+ Control.Category.Constrained: inCategoryOf :: (Category k) => k a b -> k c d -> k a b
- Control.Category.Constrained: unconstrained :: Category k => ConstrainedCategory k o a b -> k a b
+ Control.Category.Constrained: unconstrained :: (Category k) => ConstrainedCategory k o a b -> k a b
- Control.Monad.Constrained: class MonadPlus m k => MonadFail m k
+ Control.Monad.Constrained: class (MonadPlus m k) => MonadFail m k
- Control.Monad.Constrained: class MonadZero m k => MonadPlus m k
+ Control.Monad.Constrained: class (MonadZero m k) => MonadPlus m k
- Control.Monad.Constrained: class Monad m k => MonadZero m k
+ Control.Monad.Constrained: class (Monad m k) => MonadZero m k
- Control.Monad.Constrained: mapM :: (Traversable t t k k, Monoidal m k k, Object k a, Object k (t a), ObjectPair k b (t b), ObjectPair k (m b) (m (t b)), ObjectPoint k (t b)) => a `k` m b -> t a `k` m (t b)
+ Control.Monad.Constrained: mapM :: (Traversable s t k l, k ~ l, s ~ t, Applicative m k k, Object k a, Object k (t a), ObjectPair k b (t b), ObjectPair k (m b) (m (t b)), ObjectPoint k (t b)) => a `k` m b -> t a `k` m (t b)
- Control.Monad.Constrained: mplus :: MonadPlus m (->) => m a -> m a -> m a
+ Control.Monad.Constrained: mplus :: (MonadPlus m (->)) => m a -> m a -> m a
- Control.Monad.Constrained: mzero :: MonadZero m (->) => m a
+ Control.Monad.Constrained: mzero :: (MonadZero m (->)) => m a
- Data.Foldable.Constrained: class Functor t k l => Foldable t k l
+ Data.Foldable.Constrained: class (Functor t k l) => Foldable t k l
- 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
+ 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 mapM = traverse
- Data.Traversable.Constrained: mapM :: (Traversable t t k k, Monoidal m k k, Object k a, Object k (t a), ObjectPair k b (t b), ObjectPair k (m b) (m (t b)), ObjectPoint k (t b)) => a `k` m b -> t a `k` m (t b)
+ Data.Traversable.Constrained: mapM :: (Traversable s t k l, k ~ l, s ~ t, Applicative m k k, Object k a, Object k (t a), ObjectPair k b (t b), ObjectPair k (m b) (m (t b)), ObjectPoint k (t b)) => a `k` m b -> t a `k` m (t b)

Files

Control/Applicative/Constrained.hs view
@@ -28,7 +28,7 @@ import Control.Functor.Constrained import Control.Arrow.Constrained -import Prelude hiding (id, const, (.), ($), Functor(..), curry, uncurry)+import Prelude hiding (id, const, (.), ($), Functor(..), Applicative(..), curry, uncurry) import qualified Control.Category.Hask as Hask  
Control/Arrow/Constrained.hs view
@@ -104,9 +104,9 @@   --- | Unlike 'first', 'second', '***' and 'arr', '&&&' has an intrinsic notion---   of \"direction\": it is basically equivalent to precomposing the result---   of '***' with a @b -> (b,b)@, but that is in general only available+-- | 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.
Control/Category/Constrained/Prelude.hs view
@@ -20,7 +20,7 @@          ) where  import Prelude hiding ( id, const, fst, snd, (.), ($), curry, uncurry-                      , Functor(..), Monad(..), (=<<), filter+                      , Functor(..), (<$>), Applicative(..), (<*>), Monad(..), (=<<), filter                       , mapM, mapM_, sequence, sequence_ )  import Control.Category.Constrained hiding (ConstrainedMorphism)
Control/Functor/Constrained.hs view
@@ -27,7 +27,7 @@  import Control.Category.Constrained -import Prelude hiding (id, (.), Functor(..), filter)+import Prelude hiding (id, (.), Functor(..), filter, (<$>)) import qualified Prelude  import Data.Void
Control/Monad/Constrained.hs view
@@ -28,6 +28,7 @@                                 , mapM, mapM_, forM, forM_, sequence, sequence_                                 , guard, when, unless                                 , forever, void+                                , filterM                                 ) where  @@ -38,8 +39,8 @@  import Prelude hiding (      id, const, fst, snd, (.), ($)-   , Functor(..), Monad(..), (=<<)-   , uncurry, curry+   , Functor(..), Applicative(..), Monad(..), (=<<)+   , uncurry, curry, filter    , mapM, mapM_, sequence, sequence_    ) import qualified Control.Category.Hask as Hask@@ -256,6 +257,16 @@         ) => Bool -> m u `k` m u unless False = id unless True = pure . terminal+++filterM :: ( PreArrow k, Monad m k, SumToProduct c k k, EndoTraversable c k+           , ObjectPair k Bool a, Object k (c a), Object k (m (c a))+           , ObjectPair k (Bool, a) (c (Bool, a))+           , ObjectPair k (m Bool) (m a)+           , ObjectPair k (m (Bool, a)) (m (c (Bool, a)))+           , PointObject k (c (Bool, a))+           ) => a `k` m Bool -> c a `k` m (c a)+filterM pg = fmap (fmap snd <<< filter fst) <<< mapM (fzip <<< pg &&& pure)       
Data/Foldable/Constrained.hs view
@@ -33,10 +33,12 @@    , Functor(..)    , uncurry, curry    , mapM_, sequence_, concatMap+   , Foldable(..)    ) import Data.Monoid  import qualified Control.Category.Hask as Hask+import qualified Data.Foldable as Hask import qualified Control.Arrow as A  import Control.Arrow.Constrained@@ -44,9 +46,25 @@   +-- | Foldable class, generalised to use arrows in categories other than 'Hask.->'. This changes the interface+--   somewhat &#x2013; in particular, 'Hask.foldr' relies on currying and hence can't really be expressed in+--   a category without exponential objects; however the monoidal folds come out quite nicely. (Of course,+--   it's debatable how much sense the Hask-'Monoid' class even makes in other categories.)+--   +--   Unlike with the 'Functor' classes, there is no derived instance @'Hask.Foldable' f => 'Foldable' f (->) (->)@:+--   in this case, it would prevent some genarality.+--   See below for how to define such an instance manually. class (Functor t k l) => Foldable t k l where+  -- |+  -- @+  -- 'ffoldl' &#x2261; 'uncurry' . 'Hask.foldl' . 'curry'+  -- @   ffoldl :: ( ObjectPair k a b, ObjectPair l a (t b)             ) => k (a,b) a -> l (a,t b) a+  -- |+  -- @+  -- 'foldMap' &#x2261; 'Hask.foldMap'+  -- @   foldMap :: ( Object k a, Object l (t a), Monoid m, Object k m, Object l m )                => (a `k` m) -> t a `l` m @@ -87,7 +105,7 @@ instance Foldable [] (->) (->) where   foldMap _ [] = mempty   foldMap f (x:xs) = f x <> foldMap f xs-  ffoldl f = uncurry $ foldl (curry f)+  ffoldl f = uncurry $ Hask.foldl (curry f)  instance Foldable Maybe (->) (->) where   foldMap f Nothing = mempty
Data/Traversable/Constrained.hs view
@@ -17,7 +17,8 @@ module Data.Traversable.Constrained            ( module Control.Applicative.Constrained             , Traversable(..)-           , sequence, mapM, forM+           , sequence, forM+           , EndoTraversable            ) where  @@ -29,6 +30,8 @@    , Functor(..)    , uncurry, curry    , mapM, mapM_, sequence+   , Traversable(..)+   , Applicative(..)    ) import qualified Control.Category.Hask as Hask import qualified Control.Arrow as A@@ -46,7 +49,15 @@               , ObjectPair k b (t b), ObjectPair l (f b) (f (t b))                , ObjectPoint k (t b)               ) => a `l` f b -> s a `l` f (t b)+  +  -- | 'traverse', restricted to endofunctors. May be more efficient to implement.+  mapM :: ( k~l, s~t, Applicative m k k+          , Object k a, Object k (t a), ObjectPair k b (t b), ObjectPair k (m b) (m (t b))+          , ObjectPoint k (t b)+          ) => a `k` m b -> t a `k` m (t b)+  mapM = traverse + sequence :: ( Traversable t t k k, Monoidal f k k             , ObjectPair k a (t a), ObjectPair k (f a) (f (t a))             , Object k (t (f a))@@ -72,13 +83,6 @@ --   fmap (Stupid (ConstrainedMorphism f)) (Stupid a) = Stupid (f a) --  --- | 'traverse', restricted to endofunctors.-mapM :: ( Traversable t t k k, Monoidal m k k-        , Object k a, Object k (t a), ObjectPair k b (t b), ObjectPair k (m b) (m (t b))-        , ObjectPoint k (t b)-        ) => a `k` m b -> t a `k` m (t b)-mapM = traverse- -- | Flipped version of 'traverse' / 'mapM'. forM :: forall s t k m a b l .          ( Traversable s t k l, Monoidal m k l, Function l@@ -87,5 +91,9 @@         , ObjectPoint k (t b)         ) => s a -> (a `l` m b) -> m (t b) forM v f = traverse f $ v+++-- | A traversable that can be used with 'mapM'.+type EndoTraversable t k = Traversable t t k k  
constrained-categories.cabal view
@@ -1,5 +1,5 @@ Name:                constrained-categories-Version:             0.2.0.0+Version:             0.2.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