on develop help sign in
Merge branch 'develop' of github.com:reflex-frp/reflex into develop
commitdcd66cb9a0aacdfc965c9069671b3827eca511bf authorRyan Trinkle <ryan.trinkle@gmail.com> dateTue 27 Feb 2018, 01:16 (9 years ago) parentbe224df6a8c4ef
1 file changed+8
src/Reflex/Class.hs+8
src/Reflex/Class.hs+8
@@ -912,6 +912,14 @@ zipDynWith f da db =
912912 return $ Just $ f a b
913913 in unsafeBuildDynamic (f <$> sample (current da) <*> sample (current db)) ec
914914
915+instance (Reflex t, Semigroup a) => Semigroup (Dynamic t a) where
916+ (<>) = zipDynWith (<>)
917+#if MIN_VERSION_semigroups(0,17,0)
918+ stimes n = fmap $ stimes n
919+#else
920+ times1p n = fmap $ times1p n
921+#endif
922+
915923instance (Reflex t, Monoid a) => Monoid (Dynamic t a) where
916924 mconcat = distributeListOverDynWith mconcat
917925 mempty = constDyn mempty