functor-combinators-0.3.5.1: Tools for functor combinator-based program design

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
 Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> Predicate a Source # Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> Comparison a Source # Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> Equivalence a Source # Source # Since: 0.3.0.0 Instance detailsDefined in Data.HFunctor.Final Associated Typestype FreeFunctorBy Dec :: (Type -> Type) -> Constraint Source # MethodsfromFree :: 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 (U1 :: Type -> Type) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> U1 a Source # Conclude (Op r) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> Op r a Source # Conclude (Proxy :: Type -> Type) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> Proxy a Source # (Divisible m, Divise m) => Conclude (MaybeT m) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> MaybeT m a Source # (Divisible m, Divise m) => Conclude (ListT m) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> ListT m a Source # Conclude (Dec f) Source # Instance details Methodsconclude :: (a -> Void) -> Dec f a Source # Conclude f => Conclude (Rec1 f) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> Rec1 f a Source # Conclude f => Conclude (Alt f) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> Alt f a Source # Conclude f => Conclude (IdentityT f) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> IdentityT f a Source # Conclude m => Conclude (ReaderT r m) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> ReaderT r m a Source # Conclude m => Conclude (StateT s m) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> StateT s m a Source # Conclude m => Conclude (StateT s m) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> StateT s m a Source # Conclude m => Conclude (WriterT w m) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> WriterT w m a Source # Conclude m => Conclude (WriterT w m) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> WriterT w m a Source # Conclude f => Conclude (Reverse f) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> Reverse f a Source # Conclude f => Conclude (Backwards f) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> Backwards f a Source # Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> WrappedDivisible f a Source # Conclude f => Conclude (Step f) Source # Since: 0.3.0.0 Instance detailsDefined in Control.Applicative.Step Methodsconclude :: (a -> Void) -> Step f a Source # Conclude f => Conclude (ListF f) Source # Since: 0.3.0.0 Instance detailsDefined in Control.Applicative.ListF Methodsconclude :: (a -> Void) -> ListF f a Source # Conclude f => Conclude (MaybeF f) Source # Since: 0.3.3.0 Instance detailsDefined in Control.Applicative.ListF Methodsconclude :: (a -> Void) -> MaybeF 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 detailsDefined in Data.HFunctor.Interpret Methodsconclude :: (a -> Void) -> AltConst w a Source # Source # Since: 0.3.0.0 Instance detailsDefined in Data.HFunctor.Final Methodscontramap :: (a -> b) -> Final Conclude f b -> Final Conclude f a #(>\$) :: b -> Final Conclude f b -> Final Conclude f a # Source # Since: 0.3.0.0 Instance detailsDefined in Data.HFunctor.Final Methodsdecide :: (a -> Either b c) -> Final Conclude f b -> Final Conclude f c -> Final Conclude f a Source # (Conclude f, Conclude g) => Conclude (f :*: g) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> (f :*: g) a Source # (Conclude f, Conclude g) => Conclude (Product f g) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> Product f g a Source # Conclude (ProxyF f :: Type -> Type) Source # Since: 0.3.0.0 Instance detailsDefined in Data.HFunctor Methodsconclude :: (a -> Void) -> ProxyF f a Source # Source # Since: 0.3.0.0 Instance detailsDefined in Data.HFunctor.Final Methodsconclude :: (a -> Void) -> Final Decidable f a Source # Source # Since: 0.3.0.0 Instance detailsDefined in Data.HFunctor.Final Methodsconclude :: (a -> Void) -> Final Conclude f a Source # Conclude f => Conclude (M1 i c f) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> M1 i c f a Source # (Apply f, Applicative f, Conclude g) => Conclude (f :.: g) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> (f :.: g) a Source # (Apply f, Applicative f, Conclude g) => Conclude (Compose f g) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> Compose f g a Source # Conclude m => Conclude (RWST r w s m) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> RWST r w s m a Source # Conclude m => Conclude (RWST r w s m) Source # Instance detailsDefined in Data.Functor.Contravariant.Conclude Methodsconclude :: (a -> Void) -> RWST r w s m a Source # 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 detailsDefined in Data.HFunctor.Chain Methodsconclude :: (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