@@ -9,7 +9,9 @@ License : MIT
9Maintainer : Paweł Nowak <pawel834@gmail.com>
9Maintainer : Paweł Nowak <pawel834@gmail.com>
10Stability : experimental
10Stability : experimental
12−module Control.Lens.Internal.SemiIso where
12+module Control.Lens.Internal.SemiIso
14import Control.Monad
16import Control.Monad
15import Data.Profunctor
17import Data.Profunctor
@@ -25,9 +27,9 @@ instance Profunctor (Retail s t) where
25 rmap f (Retail l r) = Retail l (fmap f . r)
27 rmap f (Retail l r) = Retail l (fmap f . r)
27instance Choice (Retail s t) where
29instance Choice (Retail s t) where
28− left' (Retail as st) = Retail
30+ left' (Retail as st) = Retail
29 (either as (\_ -> Left "semi-iso failed")) (fmap Left . st)
31 (either as (\_ -> Left "semi-iso failed")) (fmap Left . st)
30− right' (Retail as st) = Retail
32+ right' (Retail as st) = Retail
31 (either (\_ -> Left "semi-iso failed") as) (fmap Right . st)
33 (either (\_ -> Left "semi-iso failed") as) (fmap Right . st)
33-- Proof of 'Exposed' laws:
35-- Proof of 'Exposed' laws: