on develop help sign in
Use pushCheap in uniqDynamic
commitfab83020629c747f07a5f8d5810cf96885c860dd authorRyan Trinkle <ryan.trinkle@gmail.com> dateTue 3 Oct 2017, 21:32 (9 years ago) parent6058407
1 file changed+1−1
src/Reflex/Dynamic/Uniq.hs+1−1
src/Reflex/Dynamic/Uniq.hs+1−1
@@ -31,7 +31,7 @@ newtype UniqDynamic t a = UniqDynamic { unUniqDynamic :: Dynamic t a }
3131
3232-- | Construct a 'UniqDynamic' by eliminating redundant updates from a 'Dynamic'.
3333uniqDynamic :: 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
3535 old <- sample $ current d --TODO: Is it better to sample ourselves here?
3636 return $ unsafeJustChanged old new
3737