mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
Revert "Join is Foldable over These."
This reverts commit 87c4c0e5c1e3bc226dcfcac0162f66e0f5b9a5b1.
This commit is contained in:
parent
c2acb43ecc
commit
3d6c69ff33
@ -1,13 +1,8 @@
|
|||||||
{-# LANGUAGE FlexibleInstances #-}
|
|
||||||
module Data.Bifunctor.Join where
|
module Data.Bifunctor.Join where
|
||||||
|
|
||||||
import Data.Bifunctor
|
import Data.Bifunctor
|
||||||
import Data.Bifunctor.These
|
|
||||||
|
|
||||||
newtype Join p a = Join { runJoin :: p a a }
|
newtype Join p a = Join { runJoin :: p a a }
|
||||||
|
|
||||||
instance Bifunctor p => Functor (Join p) where
|
instance Bifunctor p => Functor (Join p) where
|
||||||
fmap f = Join . bimap f f . runJoin
|
fmap f = Join . bimap f f . runJoin
|
||||||
|
|
||||||
instance Foldable (Join These) where
|
|
||||||
foldMap f = these id id mappend . bimap f f . runJoin
|
|
||||||
|
Loading…
Reference in New Issue
Block a user