Skip to content

Commit b4b9cd7

Browse files
committed
Clean up Strong instance for CoKleisli
1 parent d1e4073 commit b4b9cd7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Data/Profunctor/Kleisli/Linear.hs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,5 @@ newtype CoKleisli w a b = CoKleisli { runCoKleisli :: w a #-> b }
5656
instance Data.Functor f => Profunctor (CoKleisli f) where
5757
dimap f g (CoKleisli h) = CoKleisli (g . h . Data.fmap f)
5858

59-
-- instance of a more general idea, but this will do for now
6059
instance Strong Either Void (CoKleisli (Data.Const x)) where
61-
first (CoKleisli f) = CoKleisli (\(Data.Const x) -> (Left :: a #-> Either a b) (f (Data.Const x)))
62-
-- XXX: the above type signature is necessary for certain older versions of
63-
-- the compiler, and as such is temporary
60+
first (CoKleisli f) = CoKleisli (\(Data.Const x) -> Left (f (Data.Const x)))

0 commit comments

Comments
 (0)