summaryrefslogtreecommitdiff
path: root/src/Data/Profunctor/Traversing.hs
diff options
context:
space:
mode:
authorryanglscott <>2020-02-13 19:20:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2020-02-13 19:20:00 (GMT)
commitc7d9697c5985a76ca91679cc2c69363f75216ef5 (patch)
treec2f11ab5b8244bc8ad89f96c68922eab22b854d8 /src/Data/Profunctor/Traversing.hs
parent724838593bf554f014043beb989aa184f4585628 (diff)
version 5.5.2HEAD5.5.2master
Diffstat (limited to 'src/Data/Profunctor/Traversing.hs')
-rw-r--r--src/Data/Profunctor/Traversing.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Data/Profunctor/Traversing.hs b/src/Data/Profunctor/Traversing.hs
index 2bd0c5a..99edff5 100644
--- a/src/Data/Profunctor/Traversing.hs
+++ b/src/Data/Profunctor/Traversing.hs
@@ -20,6 +20,7 @@ module Data.Profunctor.Traversing
import Control.Applicative
import Control.Arrow (Kleisli(..))
+import Data.Bifunctor.Tannen
import Data.Functor.Compose
import Data.Functor.Identity
import Data.Orphans ()
@@ -136,6 +137,9 @@ instance Applicative m => Traversing (Star m) where
traverse' (Star m) = Star (traverse m)
wander f (Star amb) = Star (f amb)
+instance (Functor f, Traversing p) => Traversing (Tannen f p) where
+ traverse' = Tannen . fmap traverse' . runTannen
+
newtype CofreeTraversing p a b = CofreeTraversing { runCofreeTraversing :: forall f. Traversable f => p (f a) (f b) }
instance Profunctor p => Profunctor (CofreeTraversing p) where