@@ -117,8 +117,6 @@ import Control.Lens
117117 , Iso'
118118 , itraverse
119119 , makePrisms
120− , matching
121− , prism
122120 , Prism'
123121 , prism'
124122 , re
@@ -721,40 +719,6 @@ joinPairTextEncoder = Encoder . \case
721719 _ -> return (kt, T.drop (T.length separator) vt)
722720 }
723721
724−-- -- | Like '_2' but for DSum not '(,)'.
725−-- dSumFirstLensLike
726−-- :: forall f g g' h
727−-- . Functor f
728−-- => (forall a. g a -> f (g' a))
729−-- -> (DSum g h) -> f (DSum g' h)
730−-- dSumFirstLensLike f (l :=> r) = (:=> r) <$> f l
731−--
732−-- -- | Like '_2' but for DSum not '(,)'.
733−-- dSumSecondLensLike
734−-- :: forall f g h h'
735−-- . Functor f
736−-- => (forall a. h a -> f (h' a))
737−-- -> (DSum g h) -> f (DSum g h')
738−-- dSumSecondLensLike f (l :=> r) = (l :=>) <$> f r
739−
740−-- TODO: Rewrite this by composing the given prism with a lens on the first
741−-- element of the DSum Or, more likely, the user can compose it themselves
742−--
743−-- TODO I (@Ericson2314) think this previous comment is wrong. I wrote the lenses above.
744−-- It didn't help. Combining lenses and prisms yields (affine) traversals, not
745−-- prisms. Perhaps If we had "DStrong", like, 'Strong' but for 'DSum', not '(,)', we
746−-- could get something like:
747−--
748−-- > dSumFirstOptic
749−-- > :: forall f g g' h
750−-- > . DStrong p
751−-- > => (forall a. p (g a) (g' a))
752−-- > -> p (DSum g h) (DSum g' h)
753−-- > dSumFirstOptic = ???
754−--
755−-- That is certainly a science project, and I don't anticipate any additional
756−-- generality between that and what is written.
757−
758722-- This slight generalization of 'rPrism' happens to be enough to write all our
759723-- prism combinators so far.
760724dSumPrism