1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00

Revert "Join is Foldable over These."

This reverts commit 87c4c0e5c1e3bc226dcfcac0162f66e0f5b9a5b1.
This commit is contained in:
Rob Rix 2016-03-14 20:44:12 -04:00
parent c2acb43ecc
commit 3d6c69ff33

View File

@ -1,13 +1,8 @@
{-# LANGUAGE FlexibleInstances #-}
module Data.Bifunctor.Join where
import Data.Bifunctor
import Data.Bifunctor.These
newtype Join p a = Join { runJoin :: p a a }
instance Bifunctor p => Functor (Join p) where
fmap f = Join . bimap f f . runJoin
instance Foldable (Join These) where
foldMap f = these id id mappend . bimap f f . runJoin