continuations-0.0.0.0: Continuations, CPS, co-functions, and combinators for working with them
Safe HaskellNone
LanguageHaskell2010

Data.Functor.Contravariant.Applicative

Synopsis

Contravariant applicative functors

class ContravariantCPS r k => Contrapply r k | k -> r where Source #

Minimal complete definition

coliftC2 | (<&>)

Methods

coliftC2 :: ((((b >- r) -~ c) ~~ r) ~> a) -> k a -> k b -> k c Source #

(<&>) :: k ((a >- r) -~ b) -> k a -> k b infixl 3 Source #

Instances

Instances details
Contrapply Bool Predicate Source # 
Instance details

Defined in Data.Functor.Contravariant.Applicative

Methods

coliftC2 :: ((((b >- Bool) -~ c) ~~ Bool) ~> a) -> Predicate a -> Predicate b -> Predicate c Source #

(<&>) :: Predicate ((a >- Bool) -~ b) -> Predicate a -> Predicate b Source #

Contrapply r (Op r) Source # 
Instance details

Defined in Data.Functor.Contravariant.Applicative

Methods

coliftC2 :: ((((b >- r) -~ c) ~~ r) ~> a) -> Op r a -> Op r b -> Op r c Source #

(<&>) :: Op r ((a >- r) -~ b) -> Op r a -> Op r b Source #

Contrapply r ((!) r) Source # 
Instance details

Defined in Data.Functor.Contravariant.Applicative

Methods

coliftC2 :: ((((b >- r) -~ c) ~~ r) ~> a) -> (r ! a) -> (r ! b) -> r ! c Source #

(<&>) :: (r ! ((a >- r) -~ b)) -> (r ! a) -> r ! b Source #

class Contrapply r k => Contrapplicative r k | k -> r where Source #

Methods

copure :: (b -> a) -> k ((a >- r) -~ b) Source #

Instances

Instances details
Contrapplicative Bool Predicate Source # 
Instance details

Defined in Data.Functor.Contravariant.Applicative

Methods

copure :: (b -> a) -> Predicate ((a >- Bool) -~ b) Source #

Contrapplicative r (Op r) Source # 
Instance details

Defined in Data.Functor.Contravariant.Applicative

Methods

copure :: (b -> a) -> Op r ((a >- r) -~ b) Source #

Contrapplicative r ((!) r) Source # 
Instance details

Defined in Data.Functor.Contravariant.Applicative

Methods

copure :: (b -> a) -> r ! ((a >- r) -~ b) Source #