representable-profunctors 0.2.0.1 → 0.3.0
raw patch · 3 files changed
+14/−15 lines, 3 filesdep ~profunctor-extrasPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: profunctor-extras
API changes (from Hackage documentation)
- Data.Profunctor.Corepresentable: instance (CorepresentableProfunctor c, CorepresentableProfunctor d) => CorepresentableProfunctor (Compose c d)
- Data.Profunctor.Representable: instance (RepresentableProfunctor f, RepresentableProfunctor g) => RepresentableProfunctor (Compose f g)
+ Data.Profunctor.Corepresentable: instance (CorepresentableProfunctor c, CorepresentableProfunctor d) => CorepresentableProfunctor (Procompose c d)
+ Data.Profunctor.Representable: instance (RepresentableProfunctor f, RepresentableProfunctor g) => RepresentableProfunctor (Procompose f g)
Files
- Data/Profunctor/Corepresentable.hs +6/−7
- Data/Profunctor/Representable.hs +6/−6
- representable-profunctors.cabal +2/−2
Data/Profunctor/Corepresentable.hs view
@@ -1,4 +1,3 @@- {-# LANGUAGE TypeFamilies, FlexibleContexts, UndecidableInstances #-} module Data.Profunctor.Corepresentable ( CorepresentableProfunctor(..) @@ -8,8 +7,8 @@ import Data.Functor.Identity import Data.Profunctor import Control.Arrow-import qualified Data.Profunctor.Composition as Profunctor-import qualified Data.Functor.Compose as Functor+import Data.Profunctor.Composition+import Data.Functor.Compose class Functor (Corep k) => CorepresentableProfunctor k where type Corep k :: * -> *@@ -31,7 +30,7 @@ cotabulatePro = UpStar coindexPro = runUpStar -instance (CorepresentableProfunctor c, CorepresentableProfunctor d) => CorepresentableProfunctor (Profunctor.Compose c d) where- type Corep (Profunctor.Compose c d) = Functor.Compose (Corep c) (Corep d)- cotabulatePro f = Profunctor.Compose (cotabulatePro (Functor.getCompose . f)) (cotabulatePro id)- coindexPro (Profunctor.Compose f g) d = Functor.Compose $ coindexPro g <$> coindexPro f d+instance (CorepresentableProfunctor c, CorepresentableProfunctor d) => CorepresentableProfunctor (Procompose c d) where+ type Corep (Procompose c d) = Compose (Corep c) (Corep d)+ cotabulatePro f = Procompose (cotabulatePro (getCompose . f)) (cotabulatePro id)+ coindexPro (Procompose f g) d = Compose $ coindexPro g <$> coindexPro f d
Data/Profunctor/Representable.hs view
@@ -5,9 +5,9 @@ import Data.Functor import Data.Functor.Identity-import qualified Data.Functor.Compose as Functor+import Data.Functor.Compose import Data.Profunctor-import qualified Data.Profunctor.Composition as Profunctor+import Data.Profunctor.Composition import Control.Comonad class Functor (Rep k) => RepresentableProfunctor k where@@ -30,7 +30,7 @@ tabulatePro = DownStar indexPro = runDownStar -instance (RepresentableProfunctor f, RepresentableProfunctor g) => RepresentableProfunctor (Profunctor.Compose f g) where- type Rep (Profunctor.Compose f g) = Functor.Compose (Rep g) (Rep f)- tabulatePro f = Profunctor.Compose (tabulatePro id) (tabulatePro (f . Functor.Compose))- indexPro (Profunctor.Compose f g) (Functor.Compose d) = indexPro g $ indexPro f <$> d+instance (RepresentableProfunctor f, RepresentableProfunctor g) => RepresentableProfunctor (Procompose f g) where+ type Rep (Procompose f g) = Compose (Rep g) (Rep f)+ tabulatePro f = Procompose (tabulatePro id) (tabulatePro (f . Compose))+ indexPro (Procompose f g) (Compose d) = indexPro g $ indexPro f <$> d
representable-profunctors.cabal view
@@ -1,6 +1,6 @@ name: representable-profunctors category: Control, Categories-version: 0.2.0.1+version: 0.3.0 license: BSD3 cabal-version: >= 1.6 license-file: LICENSE@@ -22,7 +22,7 @@ base >= 4 && < 5, comonad >= 1.1 && < 1.2, profunctors >= 0.1.1 && < 0.2,- profunctor-extras >= 0.2 && < 0.3,+ profunctor-extras >= 0.3 && < 0.4, transformers >= 0.2.2.0 && < 0.3 exposed-modules: