type Select r = SelectT r Identity
The selection monad, which is non-strict.
Selection monad transformer, modelling search algorithms.
Martin Escardo and Paulo Oliva. "Selection functions, bar recursion and backward induction", Mathematical Structures in Computer Science 20:2 (2010), pp. 127-168. https://www.cs.bham.ac.uk/~mhe/papers/selection-escardo-oliva.pdf
Jules Hedges. "Monad transformers for backtracking search". In Proceedings of MSFP 2014. https://arxiv.org/abs/1406.2058
type Select r = SelectT r IdentityThe selection monad, which is non-strict.
select :: ((a -> r) -> a) -> Select r aConstructor for computations in the selection monad.
runSelect :: Select r a -> (a -> r) -> aRuns a Select computation with a function for evaluating answers
to select a particular answer. (The inverse of select.)
mapSelect :: (a -> a) -> Select r a -> Select r aApply a function to transform the result of a selection computation.
runSelect (mapSelect f m) = f . runSelect m
newtype SelectT r m aSelection monad transformer.
SelectT is not a functor on the category of monads, and many operations
cannot be lifted through it.
SelectT r m is strict if and only if m is.
SelectT :: (a -> m r) -> m a -> SelectT r m arunSelectT :: SelectT r m a -> (a -> m r) -> m aRuns a SelectT computation with a function for evaluating
answers to select a particular answer.
mapSelectT :: (m a -> m a) -> SelectT r m a -> SelectT r m aApply a function to transform the result of a selection computation.
This has a more restricted type than the map operations for other
monad transformers, because SelectT does not define a functor in
the category of monads.
runSelectT (mapSelectT f m) = f . runSelectT m
selectToContT :: (Monad m) => SelectT r m a -> ContT r m aConvert a selection computation to a continuation-passing computation.
instance (Generic r, Generic m, Generic a) => Generic (SelectT r m a)instance (Functor m) => Functor (SelectT r m)instance (Functor m, Monad m) => Applicative (SelectT r m)instance (Functor m, MonadPlus m) => Alternative (SelectT r m)instance (Monad m) => Monad (SelectT r m)instance (Fail.MonadFail m) => Fail.MonadFail (SelectT r m)instance (MonadPlus m) => MonadPlus (SelectT r m)instance MonadTrans (SelectT r)instance (MonadIO m) => MonadIO (SelectT r m)Community contribution. The service has not verified this documentation.
Target: Linux on x86-64. Some inferred types and resolved links are not available.
Generator: aihc-haddock-858b1951-web-1
Metadata snapshot: ac77ab7d2b1e88487eeab41661abedb7bfb8bc846deb92e7874c08d166bff65d
Open the dependency plan · Download the documentation model