on develop help sign in
Merge pull request #252 from chessai/outsource-dynamic-spider-map
185e4eaRyan Trinkle
src/Reflex/Spider/Internal.hs+5−1
@@ -2307,9 +2307,13 @@ newJoinDyn d =
2307 in Reflex.Spider.Internal.unsafeBuildDynamic readV0 v'
2307 in Reflex.Spider.Internal.unsafeBuildDynamic readV0 v'
2308
2308
2309instance HasSpiderTimeline x => Functor (Reflex.Class.Dynamic (SpiderTimeline x)) where
2309instance HasSpiderTimeline x => Functor (Reflex.Class.Dynamic (SpiderTimeline x)) where
2310− fmap f = SpiderDynamic . newMapDyn f . unSpiderDynamic
2310+ fmap = mapDynamicSpider
2311 x <$ d = R.unsafeBuildDynamic (return x) $ x <$ R.updated d
2311 x <$ d = R.unsafeBuildDynamic (return x) $ x <$ R.updated d
2312
2312
2313+mapDynamicSpider :: HasSpiderTimeline x => (a -> b) -> Reflex.Class.Dynamic (SpiderTimeline x) a -> Reflex.Class.Dynamic (SpiderTimeline x) b
2314+mapDynamicSpider f = SpiderDynamic . newMapDyn f . unSpiderDynamic
2315+{-# INLINE [1] mapDynamicSpider #-}
2316+
2313instance HasSpiderTimeline x => Applicative (Reflex.Class.Dynamic (SpiderTimeline x)) where
2317instance HasSpiderTimeline x => Applicative (Reflex.Class.Dynamic (SpiderTimeline x)) where
2314 pure = SpiderDynamic . dynamicConst
2318 pure = SpiderDynamic . dynamicConst
2315#if MIN_VERSION_base(4,10,0)
2319#if MIN_VERSION_base(4,10,0)