semigroupoids-5.3.7: Semigroupoids: Category sans id
Copyright(C) 2021 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Data.Functor.Contravariant.Conclude

Description

 
Synopsis

Documentation

class Decide f => Conclude f where Source #

The contravariant analogue of Plus. Adds on to Decide the ability to express a combinator that rejects all input, to act as the dead-end. Essentially Decidable without a superclass constraint on Divisible.

If one thinks of f a as a consumer of as, then conclude defines a consumer that cannot ever receive any input.

Conclude acts as an identity with decide, because any decision that involves conclude must necessarily always pick the other option.

That is, for, say,

decide f x concluded

f is the deciding function that picks which of the inputs of decide to direct input to; in the situation above, f must always direct all input to x, and never concluded.

Mathematically, a functor being an instance of Decide means that it is "monoidal" with respect to the contravariant "either-based" Day convolution described in the documentation of Decide. On top of Decide, it adds a way to construct an "identity" conclude where decide f x (conclude q) == x, and decide g (conclude r) y == y.

Since: 5.3.6

Methods

conclude :: (a -> Void) -> f a Source #

The consumer that cannot ever receive any input.

Instances

Instances details
Conclude Predicate Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> Predicate a Source #

Conclude Comparison Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> Comparison a Source #

Conclude Equivalence Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> Equivalence a Source #

Conclude (U1 :: Type -> Type) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> U1 a Source #

Conclude (Op r) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> Op r a Source #

Conclude (Proxy :: Type -> Type) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> Proxy a Source #

(Divisible m, Divise m) => Conclude (MaybeT m) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> MaybeT m a Source #

(Divisible m, Divise m) => Conclude (ListT m) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> ListT m a Source #

Decidable f => Conclude (WrappedDivisible f) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> WrappedDivisible f a Source #

Conclude f => Conclude (Rec1 f) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> Rec1 f a Source #

Conclude f => Conclude (Alt f) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> Alt f a Source #

Conclude f => Conclude (IdentityT f) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> IdentityT f a Source #

Conclude f => Conclude (Reverse f) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> Reverse f a Source #

Conclude m => Conclude (WriterT w m) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> WriterT w m a Source #

Conclude m => Conclude (WriterT w m) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> WriterT w m a Source #

Conclude m => Conclude (StateT s m) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> StateT s m a Source #

Conclude m => Conclude (StateT s m) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> StateT s m a Source #

Conclude m => Conclude (ReaderT r m) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> ReaderT r m a Source #

Conclude f => Conclude (Backwards f) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> Backwards f a Source #

(Conclude f, Conclude g) => Conclude (f :*: g) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> (f :*: g) a Source #

(Conclude f, Conclude g) => Conclude (Product f g) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> Product f g a Source #

Conclude f => Conclude (M1 i c f) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> M1 i c f a Source #

(Apply f, Applicative f, Conclude g) => Conclude (f :.: g) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> (f :.: g) a Source #

(Apply f, Applicative f, Conclude g) => Conclude (Compose f g) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> Compose f g a Source #

Conclude m => Conclude (RWST r w s m) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> RWST r w s m a Source #

Conclude m => Conclude (RWST r w s m) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

conclude :: (a -> Void) -> RWST r w s m a Source #

concluded :: Conclude f => f Void Source #

A potentially more meaningful form of conclude, the consumer that cannot ever receive any input. That is because it expects only input of type Void, but such a type has no values.

concluded = conclude id

Since: 5.3.6