Safe Haskell | None |
---|

- class Pointed f => Applicative f where
- type ApplicativeConstraint f x :: Constraint
- (<*>) :: (ApplicativeConstraint f a, ApplicativeConstraint f b) => f (a -> b) -> f a -> f b

- liftA :: (ApplicativeConstraint f a, ApplicativeConstraint f b, PointedConstraint f (a -> b), Applicative f) => (a -> b) -> f a -> f b
- liftA2 :: (ApplicativeConstraint f a, ApplicativeConstraint f b, FunctorConstraint f a1, FunctorConstraint f (a -> b), Applicative f) => (a1 -> a -> b) -> f a1 -> f a -> f b
- liftA3 :: (ApplicativeConstraint f a, ApplicativeConstraint f b, ApplicativeConstraint f a1, ApplicativeConstraint f (a -> b), FunctorConstraint f a2, FunctorConstraint f (a1 -> a -> b), Applicative f) => (a2 -> a1 -> a -> b) -> f a2 -> f a1 -> f a -> f b

# Documentation

class Pointed f => Applicative f whereSource

type ApplicativeConstraint f x :: ConstraintSource

(<*>) :: (ApplicativeConstraint f a, ApplicativeConstraint f b) => f (a -> b) -> f a -> f bSource

liftA :: (ApplicativeConstraint f a, ApplicativeConstraint f b, PointedConstraint f (a -> b), Applicative f) => (a -> b) -> f a -> f bSource

liftA2 :: (ApplicativeConstraint f a, ApplicativeConstraint f b, FunctorConstraint f a1, FunctorConstraint f (a -> b), Applicative f) => (a1 -> a -> b) -> f a1 -> f a -> f bSource

Lift a binary function to actions. liftA2 :: (FunctorConstraint f a, FunctorConstraint f (b -> c), Applicative f) => (a -> b -> c) -> f a -> f b -> f c

liftA3 :: (ApplicativeConstraint f a, ApplicativeConstraint f b, ApplicativeConstraint f a1, ApplicativeConstraint f (a -> b), FunctorConstraint f a2, FunctorConstraint f (a1 -> a -> b), Applicative f) => (a2 -> a1 -> a -> b) -> f a2 -> f a1 -> f a -> f bSource

Lift a ternary function to actions. liftA3 :: (FunctorConstraint f a, FunctorConstraint f (b -> c -> d), Applicative f)=> (a -> b -> c -> d) -> f a -> f b -> f c -> f d