functor-combinators-0.4.1.1: Tools for functor combinator-based program design
Copyright(c) Justin Le 2019
LicenseBSD3
Maintainerjustin@jle.im
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Functor.Contravariant.Conclude

Description

The contravariant counterpart of Plus: like Decidable, but without needing a Divisible constraint. This is only a part of this library currently for compatibility, until it is (hopefully) merged into semigroupoids.

Since: 0.3.0.0

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.

Methods

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

The consumer that cannot ever receive any input.

Instances

Instances details
Conclude SettableStateVar Source # 
Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

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

Conclude Comparison Source # 
Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

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

Conclude Equivalence Source # 
Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

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

Conclude Predicate Source # 
Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

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

FreeOf Conclude Dec Source #

Since: 0.3.0.0

Instance details

Defined in Data.HFunctor.Final

Associated Types

type FreeFunctorBy Dec :: (Type -> Type) -> Constraint Source #

Methods

fromFree :: forall (f :: Type -> Type). Dec f ~> Final Conclude f Source #

toFree :: forall (f :: Type -> Type). FreeFunctorBy Dec f => Final Conclude f ~> Dec f Source #

Conclude (Op r) Source # 
Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

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

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

Defined in Data.Functor.Contravariant.Conclude

Methods

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

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

Defined in Data.Functor.Contravariant.Conclude

Methods

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

Conclude (Dec f) Source # 
Instance details

Defined in Data.Functor.Contravariant.Divisible.Free

Methods

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

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

Defined in Data.Functor.Contravariant.Conclude

Methods

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

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

Defined in Data.Functor.Contravariant.Conclude

Methods

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

Conclude f => Conclude (Alt f) Source # 
Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

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

Conclude f => Conclude (Rec1 f) Source # 
Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

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

Conclude f => Conclude (ListF f) Source #

Since: 0.3.0.0

Instance details

Defined in Control.Applicative.ListF

Methods

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

Conclude f => Conclude (MaybeF f) Source #

Since: 0.3.3.0

Instance details

Defined in Control.Applicative.ListF

Methods

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

Conclude f => Conclude (Step f) Source #

Since: 0.3.0.0

Instance details

Defined in Control.Applicative.Step

Methods

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

Decidable f => Conclude (WrappedDivisible f) Source # 
Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

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

Monoid w => Conclude (AltConst w :: Type -> Type) Source #

Unlike for Const, this is possible because there is no Decidable instance to complicate things.

Instance details

Defined in Data.HFunctor.Interpret

Methods

conclude :: (a -> Void) -> AltConst w a Source #

Conclude f => Conclude (Backwards f) Source # 
Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

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

Conclude f => Conclude (IdentityT f) Source # 
Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

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

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

Defined in Data.Functor.Contravariant.Conclude

Methods

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

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

Defined in Data.Functor.Contravariant.Conclude

Methods

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

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

Defined in Data.Functor.Contravariant.Conclude

Methods

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

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

Defined in Data.Functor.Contravariant.Conclude

Methods

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

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

Defined in Data.Functor.Contravariant.Conclude

Methods

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

Conclude f => Conclude (Reverse f) Source # 
Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

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

Contravariant (Final Conclude f) Source #

Since: 0.3.0.0

Instance details

Defined in Data.HFunctor.Final

Methods

contramap :: (a' -> a) -> Final Conclude f a -> Final Conclude f a' #

(>$) :: b -> Final Conclude f b -> Final Conclude f a #

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

Defined in Data.Functor.Contravariant.Conclude

Methods

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

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

Defined in Data.Functor.Contravariant.Conclude

Methods

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

Conclude (ProxyF f :: Type -> Type) Source #

Since: 0.3.0.0

Instance details

Defined in Data.HFunctor

Methods

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

Conclude (Final Decidable f) Source #

Since: 0.3.0.0

Instance details

Defined in Data.HFunctor.Final

Methods

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

Conclude (Final Conclude f) Source #

Since: 0.3.0.0

Instance details

Defined in Data.HFunctor.Final

Methods

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

Decide (Final Conclude f) Source #

Since: 0.3.0.0

Instance details

Defined in Data.HFunctor.Final

Methods

decide :: (a -> Either b c) -> Final Conclude f b -> Final Conclude f c -> Final Conclude f a Source #

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

Defined in Data.Functor.Contravariant.Conclude

Methods

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

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

Defined in Data.Functor.Contravariant.Conclude

Methods

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

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

Defined in Data.Functor.Contravariant.Conclude

Methods

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

Conclude m => Conclude (RWST r w s m) Source # 
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 # 
Instance details

Defined in Data.Functor.Contravariant.Conclude

Methods

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

Conclude (Chain Night Not f) Source #

Chain Night Refutec is the free "monoid in the monoidal category of endofunctors enriched by Night" --- aka, the free Conclude.

Since: 0.3.0.0

Instance details

Defined in Data.HFunctor.Chain

Methods

conclude :: (a -> Void) -> Chain Night Not f 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