on develop help sign in
Get rid of lens dependency
commit9ed658b846d093288190f836eeb3cf32ebe39318 authorRyan Trinkle <ryan.trinkle@gmail.com> dateTue 24 Mar 2015, 14:53 (12 years ago) parent4f9ac58
3 files changed+5−7
default.nix+2−2 reflex.cabal−1 src/Reflex/Spider/Internal.hs+3−4
default.nix+2−2
@@ -1,4 +1,4 @@
1−{ mkDerivation, dependent-map, dependent-sum, lens
1+{ mkDerivation, dependent-map, dependent-sum
22, mtl, semigroups, these
33}:
44mkDerivation {
@@ -6,7 +6,7 @@ mkDerivation {
66 version = "0.1";
77 src = builtins.filterSource (path: type: baseNameOf path != ".git") ./.;
88 buildDepends = [
9− dependent-map dependent-sum lens mtl semigroups these
9+ dependent-map dependent-sum mtl semigroups these
1010 ];
1111 license = null;
1212}
reflex.cabal−1
@@ -23,7 +23,6 @@ library
2323 mtl == 2.2.*,
2424 containers == 0.5.*,
2525 these == 0.4.*,
26− lens >= 4.7 && < 4.9,
2726 primitive == 0.5.*,
2827 template-haskell >= 2.9 && < 2.11
2928
src/Reflex/Spider/Internal.hs+3−4
@@ -21,7 +21,6 @@ import Data.Functor.Misc
2121import Data.Maybe
2222import Data.IntMap (IntMap)
2323import qualified Data.IntMap as IntMap
24−import Control.Lens hiding (coerce)
2524import Control.Monad.Ref
2625import Data.Monoid ((<>))
2726
@@ -829,8 +828,8 @@ getMergeSubscribed m = {-# SCC "getMergeSubscribed.entire" #-} do
829828 parentOcc <- {-# SCC "getMergeSubscribed.a.parentOcc" #-} liftIO $ getEventSubscribedOcc parentSubd
830829 height <- {-# SCC "getMergeSubscribed.a.height" #-} liftIO $ readIORef $ eventSubscribedHeightRef parentSubd
831830 return $ {-# SCC "getMergeSubscribed.a.returnVal" #-} (unsafeCoerce s :: Any, fmap (k :=>) parentOcc, height, WrapArg k :=> parentSubd)
832− let dm = DMap.fromDistinctAscList $ catMaybes $ map (^._2) subscribers
833− subscriberHeights = map (^._3) subscribers
831+ let dm = DMap.fromDistinctAscList $ catMaybes $ map (\(_, x, _, _) -> x) subscribers
832+ subscriberHeights = map (\(_, _, x, _) -> x) subscribers
834833 myHeight =
835834 if any (==invalidHeight) subscriberHeights --TODO: Replace 'any' with invalidHeight-preserving 'maximum'
836835 then invalidHeight
@@ -852,7 +851,7 @@ getMergeSubscribed m = {-# SCC "getMergeSubscribed.entire" #-} do
852851 , mergeSubscribedHeight = heightRef
853852 , mergeSubscribedSubscribers = subsRef
854853 , mergeSubscribedSelf = unsafeCoerce $ map (\(x, _, _, _) -> x) subscribers --TODO: Does lack of strictness make this leak?
855− , mergeSubscribedParents = DMap.fromDistinctAscList $ map (^._4) subscribers
854+ , mergeSubscribedParents = DMap.fromDistinctAscList $ map (\(_, _, _, x) -> x) subscribers
856855#ifdef DEBUG_NODEIDS
857856 , mergeSubscribedNodeId = unsafeNodeId m
858857#endif