module Sound.Sc3.Common.Monad.Operators where
import Control.Applicative
infixl 7 .*,*.,.*.
infixl 6 .+,+.,.+.
infixl 7 ./,/.,./.
infixl 6 .-,-.,.-.
(.+) :: (Functor f, Num a) => f a -> a -> f a
f a
m .+ :: forall (f :: * -> *) a. (Functor f, Num a) => f a -> a -> f a
.+ a
n = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (forall a. Num a => a -> a -> a
+ a
n) f a
m
(+.) :: (Functor f, Num a) => a -> f a -> f a
a
m +. :: forall (f :: * -> *) a. (Functor f, Num a) => a -> f a -> f a
+. f a
n = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (forall a. Num a => a -> a -> a
+ a
m) f a
n
(.+.) :: (Applicative m, Num a) => m a -> m a -> m a
.+. :: forall (m :: * -> *) a. (Applicative m, Num a) => m a -> m a -> m a
(.+.) = forall (f :: * -> *) a b c.
Applicative f =>
(a -> b -> c) -> f a -> f b -> f c
liftA2 forall a. Num a => a -> a -> a
(+)
(.*) :: (Functor f, Num a) => f a -> a -> f a
f a
m .* :: forall (f :: * -> *) a. (Functor f, Num a) => f a -> a -> f a
.* a
n = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (forall a. Num a => a -> a -> a
* a
n) f a
m
(*.) :: (Functor f, Num a) => a -> f a -> f a
a
m *. :: forall (f :: * -> *) a. (Functor f, Num a) => a -> f a -> f a
*. f a
n = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (forall a. Num a => a -> a -> a
* a
m) f a
n
(.*.) :: (Applicative m, Num a) => m a -> m a -> m a
.*. :: forall (m :: * -> *) a. (Applicative m, Num a) => m a -> m a -> m a
(.*.) = forall (f :: * -> *) a b c.
Applicative f =>
(a -> b -> c) -> f a -> f b -> f c
liftA2 forall a. Num a => a -> a -> a
(*)
(.-) :: (Functor f, Num a) => f a -> a -> f a
f a
m .- :: forall (f :: * -> *) a. (Functor f, Num a) => f a -> a -> f a
.- a
n = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (forall a. Num a => a -> a -> a
subtract a
n) f a
m
(-.) :: (Functor f, Num a) => a -> f a -> f a
a
m -. :: forall (f :: * -> *) a. (Functor f, Num a) => a -> f a -> f a
-. f a
n = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (a
m forall a. Num a => a -> a -> a
-) f a
n
(.-.) :: (Applicative m, Num a) => m a -> m a -> m a
.-. :: forall (m :: * -> *) a. (Applicative m, Num a) => m a -> m a -> m a
(.-.) = forall (f :: * -> *) a b c.
Applicative f =>
(a -> b -> c) -> f a -> f b -> f c
liftA2 (-)
(./) :: (Functor f,Fractional a) => f a -> a -> f a
f a
m ./ :: forall (f :: * -> *) a.
(Functor f, Fractional a) =>
f a -> a -> f a
./ a
n = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (forall a. Fractional a => a -> a -> a
/ a
n) f a
m
(/.) :: (Functor f,Fractional a) => a -> f a -> f a
a
m /. :: forall (f :: * -> *) a.
(Functor f, Fractional a) =>
a -> f a -> f a
/. f a
n = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (a
m forall a. Fractional a => a -> a -> a
/) f a
n
(./.) :: (Applicative m,Fractional a) => m a -> m a -> m a
./. :: forall (m :: * -> *) a.
(Applicative m, Fractional a) =>
m a -> m a -> m a
(./.) = forall (f :: * -> *) a b c.
Applicative f =>
(a -> b -> c) -> f a -> f b -> f c
liftA2 forall a. Fractional a => a -> a -> a
(/)