Safe Haskell | None |
---|

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

- liftA :: (ApplicativeConstraint f a, ApplicativeConstraint f b, ApplicativeConstraint 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 Functor f => Applicative f whereSource

type ApplicativeConstraint f x :: ConstraintSource

pure :: ApplicativeConstraint f a => a -> f aSource

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

liftA :: (ApplicativeConstraint f a, ApplicativeConstraint f b, ApplicativeConstraint 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