MonadTrans is a typeclass that abstracts lifting arbitray monadic computations in another context.

import arrow.mtl.extensions.optiont.monadTrans.monadTrans
import arrow.core.extensions.*
import arrow.core.*
import arrow.mtl.*

OptionT.monadTrans().run {
// OptionT(value=Id(Some(hello)))


Arrow provides MonadTransLaws in the form of test cases for internal verification of lawful instances and third party apps creating their own MonadTrans instances.

Creating your own MonadTrans instances

Arrow already provides MonadTrans instances for OptionT. See the implementation and accompanying testcases for reference.

See Deriving and creating custom typeclass

Data types

Module Data types
arrow.mtl AccumT, EitherT, Kleisli, OptionT, StateT, WriterT

Type Class Hierarchy

Do you like Arrow?

Arrow Org