diff --git a/src/Data/Bifunctor/Join.hs b/src/Data/Bifunctor/Join.hs index 6628c948b..c5d5b94ac 100644 --- a/src/Data/Bifunctor/Join.hs +++ b/src/Data/Bifunctor/Join.hs @@ -1,3 +1,6 @@ module Data.Bifunctor.Join where newtype Join p a = { runJoin :: p a a } + +instance Bifunctor p => Functor (Join p) where + fmap f = Join . bimap f f . runJoin