categories 0.55.0 → 0.55.1
raw patch · 5 files changed
+17/−17 lines, 5 filesdep ~basedep ~voidPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, void
API changes (from Hackage documentation)
Files
- Control/Category/Associative.hs +2/−2
- Control/Category/Braided.hs +6/−6
- Control/Category/Cartesian.hs +4/−4
- Control/Category/Monoidal.hs +3/−3
- categories.cabal +2/−2
Control/Category/Associative.hs view
@@ -34,10 +34,10 @@ class Bifunctor s k k k => Disassociative k s where disassociate :: k (s a (s b c)) (s (s a b) c) -{-# RULES+{-- RULES "copentagonal coherence" first disassociate . disassociate . second disassociate = disassociate . disassociate "pentagonal coherence" second associate . associate . first associate = associate . associate- #-}+ --} instance Associative (->) (,) where associate ((a,b),c) = (a,(b,c))
Control/Category/Braided.hs view
@@ -16,8 +16,8 @@ , swap ) where -import Control.Categorical.Bifunctor-import Control.Category.Associative+-- import Control.Categorical.Bifunctor+-- import Control.Category.Associative {- | A braided (co)(monoidal or associative) category can commute the arguments of its bi-endofunctor. Obeys the laws: @@ -40,10 +40,10 @@ instance Braided (->) (,) where braid ~(a,b) = (b,a) -{-# RULES+{- RULES "braid/associate/braid" second braid . associate . first braid = associate . braid . associate "braid/disassociate/braid" first braid . disassociate . second braid = disassociate . braid . disassociate- #-}+ --} {- | If we have a symmetric (co)'Monoidal' category, you get the additional law:@@ -55,9 +55,9 @@ swap :: Symmetric k p => k (p a b) (p b a) swap = braid -{-# RULES+{-- RULES "swap/swap" swap . swap = id- #-}+ --} instance Symmetric (->) Either
Control/Category/Cartesian.hs view
@@ -61,12 +61,12 @@ f &&& g = bimap f g . diag -{-# RULES+{-- RULES "fst . diag" fst . diag = id "snd . diag" snd . diag = id "fst . f &&& g" forall f g. fst . (f &&& g) = f "snd . f &&& g" forall f g. snd . (f &&& g) = g- #-}+ --} instance PreCartesian (->) where type Product (->) = (,)@@ -119,12 +119,12 @@ codiag = id ||| id f ||| g = codiag . bimap f g -{-# RULES+{-- RULES "codiag . inl" codiag . inl = id "codiag . inr" codiag . inr = id "(f ||| g) . inl" forall f g. (f ||| g) . inl = f "(f ||| g) . inr" forall f g. (f ||| g) . inr = g- #-}+ --} instance PreCoCartesian (->) where type Sum (->) = Either
Control/Category/Monoidal.hs view
@@ -26,7 +26,7 @@ , Comonoidal(..) ) where -import Control.Category.Braided+-- import Control.Category.Braided import Control.Category.Associative import Control.Categorical.Bifunctor import Data.Void@@ -65,7 +65,7 @@ coidl :: k a (p (Id k p) a) coidr :: k a (p a (Id k p)) -{-# RULES+{-- RULES -- "bimap id idl/associate" second idl . associate = first idr -- "bimap idr id/associate" first idr . associate = second idl -- "disassociate/bimap id idl" disassociate . second idl = first idr@@ -78,7 +78,7 @@ "idl/braid" idl . braid = idr "braid/coidr" braid . coidr = coidl "braid/coidl" braid . coidl = coidr- #-}+ --} instance HasIdentity (->) (,) where type Id (->) (,) = Void
categories.cabal view
@@ -1,6 +1,6 @@ name: categories category: Control-version: 0.55.0+version: 0.55.1 license: BSD3 cabal-version: >= 1.2 license-file: LICENSE@@ -33,7 +33,7 @@ build-depends: base >= 4 && < 5,- void >= 0.4 && < 0.5+ void >= 0.5 && < 0.6 ghc-options: -Wall if flag(Optimize)