on master help sign in
bump reflex-platform, fix warnings, remove a chunk of commented-out code.
commita139e8bc07602329b5e03867f5cb20777d0a0ae3 authorCale Gibbard <cgibbard@gmail.com> dateTue 18 Jun 2019, 21:58 (7 years ago) parent62f1b16
2 files changed+2−38
dep/reflex-platform/github.json+2−2 lib/route/src/Obelisk/Route.hs−36
dep/reflex-platform/github.json+2−2
@@ -2,6 +2,6 @@
22 "owner": "reflex-frp",
33 "repo": "reflex-platform",
44 "branch": "cg-bump-reflex-dom",
5− "rev": "7ecb4c255bb053a7a4796ffd6331cdbe210de91c",
6− "sha256": "1mngxa24cfpvxxq4hgh77nw36vny4abl5wi2xmlwpkk25wzm0h0x"
5+ "rev": "b220ba089e2de2110eb22c5388e09d99e4321148",
6+ "sha256": "0ds6bcw4p9q5x8h39djyqp5sp7wdzr9mmknsyjafn5l199hscppw"
77}
lib/route/src/Obelisk/Route.hs−36
@@ -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