on develop help sign in
Added IsString instance for Dynamic
ed4d6bfTom Smalley
src/Reflex/Class.hs+3
@@ -806,6 +806,9 @@ switcher :: (Reflex t, MonadHold t m)
806 => Behavior t a -> Event t (Behavior t a) -> m (Behavior t a)
806 => Behavior t a -> Event t (Behavior t a) -> m (Behavior t a)
807switcher b eb = pull . (sample <=< sample) <$> hold b eb
807switcher b eb = pull . (sample <=< sample) <$> hold b eb
808
808
809+instance (Reflex t, IsString a) => IsString (Dynamic t a) where
810+ fromString = pure . fromString
811+
809-- | Combine two 'Dynamic's. The result will change whenever either (or both)
812-- | Combine two 'Dynamic's. The result will change whenever either (or both)
810-- input 'Dynamic' changes. Equivalent to @zipDynWith (,)@.
813-- input 'Dynamic' changes. Equivalent to @zipDynWith (,)@.
811zipDyn :: Reflex t => Dynamic t a -> Dynamic t b -> Dynamic t (a, b)
814zipDyn :: Reflex t => Dynamic t a -> Dynamic t b -> Dynamic t (a, b)