packages feed

representable-profunctors 3.1 → 3.2

raw patch · 4 files changed

+6/−103 lines, 4 filesdep −comonaddep −profunctor-extrasdep −profunctors

Dependencies removed: comonad, profunctor-extras, profunctors, tagged, transformers

Files

− .travis.yml
@@ -1,1 +0,0 @@-language: haskell
− Data/Profunctor/Corepresentable.hs
@@ -1,36 +0,0 @@-{-# LANGUAGE TypeFamilies, FlexibleContexts, UndecidableInstances #-}-module Data.Profunctor.Corepresentable-  ( CorepresentableProfunctor(..)-  ) where--import Data.Functor-import Data.Functor.Identity-import Data.Profunctor-import Control.Arrow-import Data.Profunctor.Composition-import Data.Functor.Compose--class (Profunctor k, Functor (Corep k)) => CorepresentableProfunctor k where-  type Corep k :: * -> *-  cotabulatePro :: (d -> Corep k c) -> k d c-  coindexPro :: k d c -> d -> Corep k c--instance CorepresentableProfunctor (->) where-  type Corep (->) = Identity-  cotabulatePro f = runIdentity . f-  coindexPro f = Identity . f--instance (Monad m, Functor m) => CorepresentableProfunctor (Kleisli m) where-  type Corep (Kleisli m) = m-  cotabulatePro = Kleisli-  coindexPro = runKleisli--instance Functor f => CorepresentableProfunctor (UpStar f) where-  type Corep (UpStar f) = f-  cotabulatePro = UpStar-  coindexPro = runUpStar--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
@@ -1,43 +0,0 @@-{-# LANGUAGE TypeFamilies, FlexibleContexts, UndecidableInstances #-}-module Data.Profunctor.Representable-  ( RepresentableProfunctor(..)-  ) where--import Data.Functor-import Data.Functor.Identity-import Data.Functor.Compose-import Data.Proxy-import Data.Profunctor-import Data.Profunctor.Composition-import Data.Tagged-import Control.Comonad--class (Profunctor k, Functor (Rep k)) => RepresentableProfunctor k where-  type Rep k :: * -> *-  tabulatePro :: (Rep k d -> c) -> k d c-  indexPro :: k d c -> Rep k d -> c--instance RepresentableProfunctor (->) where-  type Rep (->) = Identity-  tabulatePro f = f . Identity-  indexPro f (Identity d) = f d--instance Functor w => RepresentableProfunctor (Cokleisli w) where-  type Rep (Cokleisli w) = w-  tabulatePro = Cokleisli-  indexPro = runCokleisli--instance RepresentableProfunctor Tagged where-  type Rep Tagged = Proxy-  tabulatePro f = Tagged (f Proxy)-  indexPro (Tagged a) _ = a--instance Functor f => RepresentableProfunctor (DownStar f) where-  type Rep (DownStar f) = f-  tabulatePro = DownStar-  indexPro = runDownStar--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:       3.1+version:       3.2 license:       BSD3 cabal-version: >= 1.6 license-file:  LICENSE@@ -9,32 +9,15 @@ stability:     experimental homepage:      http://github.com/ekmett/representable-profunctors/ bug-reports:   http://github.com/ekmett/representable-profunctors/-copyright:     Copyright (C) 2011-2012 Edward A. Kmett-synopsis:      Representable profunctors-description:   Representable profunctors+copyright:     Copyright (C) 2011-2013 Edward A. Kmett+synopsis:      This package has been absorbed into profunctor-extras.+description:   This package has been absorbed into profunctor-extras. build-type:    Simple-extra-source-files: .travis.yml  source-repository head   type: git   location: git://github.com/ekmett/representable-profunctors.git  library-  other-extensions:-    TypeFamilies-    FlexibleContexts-    UndecidableInstances--  build-depends:-    base              >= 4       && < 5,-    comonad           == 3.0.*,-    profunctors       == 3.1.*,-    profunctor-extras == 3.0.*,-    tagged            >= 0.4.4   && < 0.5,-    transformers      >= 0.2     && < 0.4--  exposed-modules:-    Data.Profunctor.Representable-    Data.Profunctor.Corepresentable--  ghc-options:      -Wall+  build-depends: base >= 4 && < 5+  ghc-options: -Wall