@@ -31,7 +31,7 @@ newtype UniqDynamic t a = UniqDynamic { unUniqDynamic :: Dynamic t a }
32-- | Construct a 'UniqDynamic' by eliminating redundant updates from a 'Dynamic'.
32-- | Construct a 'UniqDynamic' by eliminating redundant updates from a 'Dynamic'.
33uniqDynamic :: Reflex t => Dynamic t a -> UniqDynamic t a
33uniqDynamic :: Reflex t => Dynamic t a -> UniqDynamic t a
34−uniqDynamic d = UniqDynamic $ unsafeBuildDynamic (sample $ current d) $ flip push (updated d) $ \new -> do --TODO: It would be very nice if we had an uncached push here
34+uniqDynamic d = UniqDynamic $ unsafeBuildDynamic (sample $ current d) $ flip pushCheap (updated d) $ \new -> do
35 old <- sample $ current d --TODO: Is it better to sample ourselves here?
35 old <- sample $ current d --TODO: Is it better to sample ourselves here?
36 return $ unsafeJustChanged old new
36 return $ unsafeJustChanged old new