@@ -6,13 +6,10 @@ import Control.Comonad (class Comonad, extract)
66import Control.Extend (class Extend , (=<=))
77
88import Data.Distributive (class Distributive , distribute )
9- import Data.Either (Either (..), either )
109import Data.Functor.Invariant (class Invariant , imapF )
1110import Data.Newtype (class Newtype )
1211import Data.Profunctor (class Profunctor , lcmap )
1312import Data.Profunctor.Closed (class Closed )
14- import Data.Profunctor.Cochoice (class Cochoice )
15- import Data.Profunctor.Costrong (class Costrong )
1613import Data.Profunctor.Strong (class Strong )
1714import Data.Tuple (Tuple (..), fst , snd )
1815
@@ -58,20 +55,6 @@ instance strongCostar :: Comonad f => Strong (Costar f) where
5855 first (Costar f) = Costar \x -> Tuple (f (map fst x)) (snd (extract x))
5956 second (Costar f) = Costar \x -> Tuple (fst (extract x)) (f (map snd x))
6057
61- instance costrongCostar :: Functor f => Costrong (Costar f ) where
62- unfirst (Costar f) = Costar \fb ->
63- let bd = f ((\a -> Tuple a (snd bd)) <$> fb) in fst bd
64- unsecond (Costar f) = Costar \fb ->
65- let db = f ((\a -> Tuple (fst db) a) <$> fb) in snd db
66-
67- instance cochoiceCostar :: Applicative f => Cochoice (Costar f ) where
68- unleft (Costar f) =
69- let g = either identity (\r -> g (pure (Right r))) <<< f
70- in Costar (g <<< map Left )
71- unright (Costar f) =
72- let g = either (\l -> g (pure (Left l))) identity <<< f
73- in Costar (g <<< map Right )
74-
7558instance closedCostar :: Functor f => Closed (Costar f ) where
7659 closed (Costar f) = Costar \g x -> f (map (_ $ x) g)
7760
0 commit comments