ConstraintKinds-0.0.1.2: Repackages standard type classes with the ConstraintKinds extension

Safe HaskellNone

Control.ConstraintKinds.Applicative

Synopsis

Documentation

class Functor f => Applicative f whereSource

Associated Types

type ApplicativeConstraint f x :: ConstraintSource

Methods

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

Lift a function to actions. This function may be used as a value for fmap in a Functor instance. liftA :: (ApplicativeConstraint f a, ApplicativeConstraint f (a -> b), ApplicativeConstraint f 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 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