Module

Control.Monad.Nope.Trans

Package
purescript-jsinc
Repository
david-sledge/purescript-jsinc

#NopeT Source

type NopeT :: (Type -> Type) -> Type -> Typetype NopeT = MaybeT

A monad transformer which adds failures to other monads, in the same way as Nope. As before, a is the type of successful results. The new type parameter m is the inner monad that computations run in.

#mapNopeT Source

mapNopeT :: forall m n a b. (m (Maybe a) -> n (Maybe b)) -> NopeT m a -> NopeT n b

Transform the unwrapped computation using the given function.

#nopeEither Source

nopeEither :: forall e m a. Monad m => Either e a -> NopeT m a

Construct a computation in the NopeT transformer from an Either value.

#nopeT Source

nopeT :: forall m a. m (Maybe a) -> NopeT m a

#runNopeT Source

runNopeT :: forall m a. NopeT m a -> m (Maybe a)

The inverse of NopeT. Run a computation in the NopeT monad.