@@ -548,6 +548,15 @@ instance (Reflex t, Num a) => Num (Behavior t a) where
548 negate = fmap negate
548 negate = fmap negate
549 signum = fmap signum
549 signum = fmap signum
551+instance (Num a, Reflex t) => Num (Dynamic t a) where
555+ signum = fmap signum
556+ fromInteger = pure . fromInteger
557+ negate = fmap negate
551instance (Reflex t, Semigroup a) => Semigroup (Behavior t a) where
560instance (Reflex t, Semigroup a) => Semigroup (Behavior t a) where
552 a <> b = pull $ liftM2 (<>) (sample a) (sample b)
561 a <> b = pull $ liftM2 (<>) (sample a) (sample b)
553 sconcat = pull . fmap sconcat . mapM sample
562 sconcat = pull . fmap sconcat . mapM sample