Control.Monad.Select (original) (raw)

MonadSelect r m => MonadSelect r (MaybeT m) Source #

'Extends' the possibilities considered by m to include [Nothing](/package/base-4.16.3.0/docs/Data-Maybe.html#v:Nothing "Data.Maybe"); this means that [Nothing](/package/base-4.16.3.0/docs/Data-Maybe.html#v:Nothing "Data.Maybe") gains a 'rank' (namely, a value of r), and the potential result could also be [Nothing](/package/base-4.16.3.0/docs/Data-Maybe.html#v:Nothing "Data.Maybe").

Since: 2.3

Instance details

Defined in Control.Monad.Select

(MonadTrans t, MonadSelect r m, Monad (t m)) => MonadSelect r (LiftingSelect t m) Source #

Since: 2.3

Instance details

Defined in Control.Monad.Select

(MonadSelect r m, Monoid w) => MonadSelect r (AccumT w m) Source #

'Readerizes' the accumulator: the 'ranking' function can see the value that has been accumulated (of type w), but can't add anything to it. Effectively, can be thought of as 'extending' the 'ranking' by all values of w, but which w gets given to any rank calls is predetermined by the 'outer accumulation' (and cannot change).

Since: 2.3

Instance details

Defined in Control.Monad.Select

MonadSelect r m => MonadSelect r (ExceptT e m) Source #

'Extends' the possibilities considered by m to include every value ofe; this means that the potential result could be either a [Left](/package/base-4.16.3.0/docs/Data-Either.html#v:Left "Data.Either") (making it a choice of type e) or a [Right](/package/base-4.16.3.0/docs/Data-Either.html#v:Right "Data.Either") (making it a choice of type a).

Since: 2.3

Instance details

Defined in Control.Monad.Select

MonadSelect r m => MonadSelect r (IdentityT m) Source #

Since: 2.3

Instance details

Defined in Control.Monad.Select

MonadSelect r (SelectT r Identity) Source #

Since: 2.3

Instance details

Defined in Control.Monad.Select

MonadSelect r' m => MonadSelect r' (ReaderT r m) Source #

Provides a read-only environment of type r to the 'strategy' function. However, the 'ranking' function (or more accurately, representation) has no access to r. Put another way, you can influence what values get chosen by changing r, but not how solutions are ranked.

Since: 2.3

Instance details

Defined in Control.Monad.Select

MonadSelect w m => MonadSelect w (StateT s m) Source #

'Readerizes' the state: the 'ranking' function can see a value of type s, but not modify it. Effectively, can be thought of as 'extending' the 'ranking' by all values in s, but which s gets given to any rank calls is predetermined by the 'outer state' (and cannot change).

Since: 2.3

Instance details

Defined in Control.Monad.Select

MonadSelect w m => MonadSelect w (StateT s m) Source #

'Readerizes' the state: the 'ranking' function can see a value of type s, but not modify it. Effectively, can be thought of as 'extending' the 'ranking' by all values in s, but which s gets given to any rank calls is predetermined by the 'outer state' (and cannot change).

Since: 2.3

Instance details

Defined in Control.Monad.Select

MonadSelect w' m => MonadSelect w' (WriterT w m) Source #

'Readerizes' the writer: the 'ranking' function can see the value that's been accumulated (of type w), but can't add anything to the log. Effectively, can be thought of as 'extending' the 'ranking' by all values of w, but which w gets given to any rank calls is predetermined by the 'outer writer' (and cannot change).

Since: 2.3

Instance details

Defined in Control.Monad.Select

(MonadSelect w' m, Monoid w) => MonadSelect w' (WriterT w m) Source #

'Readerizes' the writer: the 'ranking' function can see the value that's been accumulated (of type w), but can't add anything to the log. Effectively, can be thought of as 'extending' the 'ranking' by all values of w, but which w gets given to any rank calls is predetermined by the 'outer writer' (and cannot change).

Since: 2.3

Instance details

Defined in Control.Monad.Select

(MonadSelect w' m, Monoid w) => MonadSelect w' (WriterT w m) Source #

'Readerizes' the writer: the 'ranking' function can see the value that's been accumulated (of type w), but can't add anything to the log. Effectively, can be thought of as 'extending' the 'ranking' by all values of w, but which w gets given to any rank calls is predetermined by the 'outer writer' (and cannot change).

Since: 2.3

Instance details

Defined in Control.Monad.Select

MonadSelect r' m => MonadSelect r' (ContT r m) Source #

The continuation describes a way of choosing a 'search' or 'ranking' strategy for r, based on a 'ranking' using r', given any a. We then get a 'search' strategy for r.

Since: 2.3

Instance details

Defined in Control.Monad.Select

MonadSelect w' m => MonadSelect w' (RWST r w s m) Source #

A combination of an 'outer' [ReaderT](Control-Monad-Reader.html#t:ReaderT "Control.Monad.Reader"), WriterT and StateT. In short, you get a value of type r which can influence what gets picked, but not how anything is ranked, and the 'ranking' function gets access to an s and aw, but can modify neither.

Since: 2.3

Instance details

Defined in Control.Monad.Select

(MonadSelect w' m, Monoid w) => MonadSelect w' (RWST r w s m) Source #

A combination of an 'outer' [ReaderT](Control-Monad-Reader.html#t:ReaderT "Control.Monad.Reader"), WriterT and StateT. In short, you get a value of type r which can influence what gets picked, but not how anything is ranked, and the 'ranking' function gets access to an s and aw, but can modify neither.

Since: 2.3

Instance details

Defined in Control.Monad.Select

(MonadSelect w' m, Monoid w) => MonadSelect w' (RWST r w s m) Source #

A combination of an 'outer' [ReaderT](Control-Monad-Reader.html#t:ReaderT "Control.Monad.Reader"), WriterT and StateT. In short, you get a value of type r which can influence what gets picked, but not how anything is ranked, and the 'ranking' function gets access to an s and aw, but can modify neither.

Since: 2.3

Instance details

Defined in Control.Monad.Select